# HG changeset patch # User albeu # Date 1048797650 0 # Node ID e3db09ae5154a894dccf6ee9f81c5740be44c855 # Parent 1b1e33d1688ad1b588aadd4a41aed522a7284394 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. diff -r 1b1e33d1688a -r e3db09ae5154 libmpdemux/demux_demuxers.c --- 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) {