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
This commit is contained in:
albeu 2003-03-27 20:40:50 +00:00
parent 3a5ea00039
commit bc2d0751ba
1 changed files with 10 additions and 2 deletions

View File

@ -84,13 +84,21 @@ void demux_demuxers_seek(demuxer_t *demuxer,float rel_seek_secs,int flags) {
void demux_close_demuxers(demuxer_t* demuxer) { void demux_close_demuxers(demuxer_t* demuxer) {
int i; int i;
dd_priv_t* priv = demuxer->priv; dd_priv_t* priv = demuxer->priv;
stream_t *s;
if(priv->vd) if(priv->vd)
free_demuxer(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); 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_demuxer(priv->sd);
free_stream(s);
}
free(priv); free(priv);
if(demuxer->info) { if(demuxer->info) {