changeset 9710:e3db09ae5154

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.
author albeu
date Thu, 27 Mar 2003 20:40:50 +0000
parents 1b1e33d1688a
children f7295ec4fb17
files libmpdemux/demux_demuxers.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_demuxers.c	Thu Mar 27 20:38:14 2003 +0000
+++ b/libmpdemux/demux_demuxers.c	Thu Mar 27 20:40:50 2003 +0000
@@ -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) {