[Mplayer-cvslog] CVS: main/libmpdemux demux_bmp.c,1.1,1.2 demux_film.c,1.10,1.11 demux_fli.c,1.8,1.9 demux_mf.c,1.6,1.7 demux_nuv.c,1.6,1.7 demux_real.c,1.9,1.10 demux_roq.c,1.6,1.7 demux_y4m.c,1.5,1.6 demuxer.c,1.93,1.94
Alban Bedel CVS
albeu at mplayerhq.hu
Wed Apr 24 17:36:19 CEST 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv30022/libmpdemux
Modified Files:
demux_bmp.c demux_film.c demux_fli.c demux_mf.c demux_nuv.c
demux_real.c demux_roq.c demux_y4m.c demuxer.c
Log Message:
Added demuxer uninit
Index: demux_bmp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_bmp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- demux_bmp.c 20 Mar 2002 05:15:53 -0000 1.1
+++ demux_bmp.c 24 Apr 2002 15:36:06 -0000 1.2
@@ -109,3 +109,11 @@
return demuxer;
}
+
+void demux_close_bmp(demuxer_t* demuxer) {
+ bmp_image_t *bmp_image = demuxer->priv;
+
+ if(!bmp_image)
+ return;
+ free(bmp_image);
+}
Index: demux_film.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_film.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- demux_film.c 31 Mar 2002 22:52:48 -0000 1.10
+++ demux_film.c 24 Apr 2002 15:36:06 -0000 1.11
@@ -413,3 +413,14 @@
return demuxer;
}
+
+void demux_close_film(demuxer_t* demuxer) {
+ film_data_t *film_data = demuxer->priv;
+
+ if(!film_data)
+ return;
+ if(film_data->chunks)
+ free(film_data->chunks);
+ free(film_data);
+
+}
Index: demux_fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_fli.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- demux_fli.c 22 Feb 2002 03:41:19 -0000 1.8
+++ demux_fli.c 24 Apr 2002 15:36:06 -0000 1.9
@@ -153,3 +153,18 @@
return demuxer;
}
+
+void demux_close_fli(demuxer_t* demuxer) {
+ fli_frames_t *frames = demuxer->priv;
+
+ if(!frames)
+ return;
+
+ if(frames->filepos)
+ free(frames->filepos);
+ if(frames->frame_size)
+ free(frames->frame_size);
+
+ free(frames);
+
+}
Index: demux_mf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demux_mf.c 10 Mar 2002 22:49:18 -0000 1.6
+++ demux_mf.c 24 Apr 2002 15:36:06 -0000 1.7
@@ -122,3 +122,11 @@
return demuxer;
}
+
+void demux_close_mf(demuxer_t* demuxer) {
+ demuxer_mf_t *dmf = demuxer->priv;
+
+ if(!dmf)
+ return;
+ free(dmf);
+}
Index: demux_nuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_nuv.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demux_nuv.c 31 Mar 2002 21:08:15 -0000 1.6
+++ demux_nuv.c 24 Apr 2002 15:36:06 -0000 1.7
@@ -302,3 +302,16 @@
stream_seek ( demuxer->stream, orig_pos );
return 1;
}
+
+void demux_close_nuv(demuxer_t* demuxer) {
+ nuv_priv_t* priv = demuxer->priv;
+ nuv_position_t* pos;
+ if(!priv)
+ return;
+ for(pos = priv->index_list ; pos != NULL ; ) {
+ nuv_position_t* p = pos;
+ pos = pos->next;
+ free(p);
+ }
+ free(priv);
+}
Index: demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- demux_real.c 15 Mar 2002 15:51:37 -0000 1.9
+++ demux_real.c 24 Apr 2002 15:36:06 -0000 1.10
@@ -8,6 +8,9 @@
TODO: fix the whole syncing mechanism
$Log$
+ Revision 1.10 2002/04/24 15:36:06 albeu
+ Added demuxer uninit
+
Revision 1.9 2002/03/15 15:51:37 alex
added PRE-ALPHA seeking ability and index table generator (like avi's one)
@@ -510,6 +513,7 @@
{
buf = malloc(len+1);
stream_read(demuxer->stream, buf, len);
+ buf[len] = 0;
demux_info_add(demuxer, "name", buf);
free(buf);
}
Index: demux_roq.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_roq.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demux_roq.c 31 Mar 2002 18:29:09 -0000 1.6
+++ demux_roq.c 24 Apr 2002 15:36:07 -0000 1.7
@@ -242,3 +242,12 @@
return demuxer;
}
+
+void demux_close_roq(demuxer_t* demuxer) {
+ roq_data_t *roq_data = demuxer->priv;
+
+ if(!roq_data)
+ return;
+ free(roq_data);
+}
+
Index: demux_y4m.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_y4m.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- demux_y4m.c 28 Dec 2001 22:58:00 -0000 1.5
+++ demux_y4m.c 24 Apr 2002 15:36:07 -0000 1.6
@@ -255,7 +255,9 @@
void demux_close_y4m(demuxer_t *demuxer)
{
y4m_priv_t* priv = demuxer->priv;
-
+
+ if(!priv)
+ return;
if (!priv->is_older)
y4m_fini_stream_info(((y4m_priv_t*)demuxer->priv)->si);
free(((y4m_priv_t*)demuxer->priv)->si);
Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- demuxer.c 23 Apr 2002 23:21:19 -0000 1.93
+++ demuxer.c 24 Apr 2002 15:36:07 -0000 1.94
@@ -137,9 +137,39 @@
free(sh);
}
+extern void demux_close_vivo(demuxer_t *demuxer);
+extern void demux_close_real(demuxer_t *demuxer);
+extern void demux_close_y4m(demuxer_t *demuxer);
+extern void demux_close_mf(demuxer_t* demuxer);
+extern void demux_close_roq(demuxer_t* demuxer);
+extern void demux_close_film(demuxer_t* demuxer);
+extern void demux_close_bmp(demuxer_t* demuxer);
+extern void demux_close_fli(demuxer_t* demuxer);
+extern void demux_close_nuv(demuxer_t* demuxer);
+
void free_demuxer(demuxer_t *demuxer){
int i;
mp_msg(MSGT_DEMUXER,MSGL_V,"DEMUXER: freeing demuxer at %p \n",demuxer);
+ switch(demuxer->type) {
+ case DEMUXER_TYPE_VIVO:
+ demux_close_vivo(demuxer); break;
+ case DEMUXER_TYPE_REAL:
+ demux_close_real(demuxer); break;
+ case DEMUXER_TYPE_Y4M:
+ demux_close_y4m(demuxer); break;
+ case DEMUXER_TYPE_MF:
+ demux_close_mf(demuxer); break;
+ case DEMUXER_TYPE_ROQ:
+ demux_close_roq(demuxer); break;
+ case DEMUXER_TYPE_FILM:
+ demux_close_film(demuxer); break;
+ case DEMUXER_TYPE_BMP:
+ demux_close_bmp(demuxer); break;
+ case DEMUXER_TYPE_FLI:
+ demux_close_fli(demuxer); break;
+ case DEMUXER_TYPE_NUV:
+ demux_close_nuv(demuxer); break;
+ }
// free streams:
for(i=0;i<256;i++){
if(demuxer->a_streams[i]) free_sh_audio(demuxer->a_streams[i]);
More information about the MPlayer-cvslog
mailing list