[Mplayer-cvslog] CVS: main/libmpdemux demux_demuxers.c,1.3,1.4

Alban Bedel CVS albeu at mplayerhq.hu
Thu Mar 27 21:40:53 CET 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv6007/libmpdemux

Modified Files:
	demux_demuxers.c 
Log Message:
Free the stream of the audio and subtitle demuxer.
It's a bit of a hack, but atm it's the best place to free them.


Index: demux_demuxers.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_demuxers.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_demuxers.c	2 Nov 2002 19:52:59 -0000	1.3
+++ demux_demuxers.c	27 Mar 2003 20:40:50 -0000	1.4
@@ -84,13 +84,21 @@
 void demux_close_demuxers(demuxer_t* demuxer) {
   int i;
   dd_priv_t* priv = demuxer->priv;
+  stream_t *s;
 
   if(priv->vd)
     free_demuxer(priv->vd);
-  if(priv->ad && priv->ad != priv->vd)
+  if(priv->ad && priv->ad != priv->vd) {
+    // That's a hack to free the audio file stream
+    // It's ok atm but we shouldn't free that here
+    s = priv->ad->stream;
     free_demuxer(priv->ad);
-  if(priv->sd && priv->sd != priv->vd && priv->sd != priv->ad)
+    free_stream(s);
+  } if(priv->sd && priv->sd != priv->vd && priv->sd != priv->ad) {
+    s = priv->sd->stream;
     free_demuxer(priv->sd);
+    free_stream(s);
+  }
 
   free(priv);
   if(demuxer->info) {



More information about the MPlayer-cvslog mailing list