summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-27 20:40:50 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-27 20:40:50 +0000
commitbc2d0751ba86c65d945531cf9333aa6db77e08a9 (patch)
treea99b1e4d0de37a64e051d1fb087c37ae356dafe2 /libmpdemux
parent3a5ea000399ac6b159a7991145b88d1034a8286a (diff)
downloadmpv-bc2d0751ba86c65d945531cf9333aa6db77e08a9.tar.bz2
mpv-bc2d0751ba86c65d945531cf9333aa6db77e08a9.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9711 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_demuxers.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c
index 36e89ee624..e0e7680348 100644
--- a/libmpdemux/demux_demuxers.c
+++ b/libmpdemux/demux_demuxers.c
@@ -84,13 +84,21 @@ void demux_demuxers_seek(demuxer_t *demuxer,float rel_seek_secs,int flags) {
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) {