changeset 21528:370b8d95356b

Fix crash in ogg demuxer uninit with -aid
author reimar
date Sat, 09 Dec 2006 11:59:09 +0000
parents 9b228834e07b
children 06d8fa9450b7
files libmpdemux/demux_ogg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c	Sat Dec 09 11:45:41 2006 +0000
+++ b/libmpdemux/demux_ogg.c	Sat Dec 09 11:59:09 2006 +0000
@@ -1612,7 +1612,7 @@
       if (ogg_d->text_langs[i]) free(ogg_d->text_langs[i]);
     free(ogg_d->text_langs);
   }
-  if(demuxer->audio->id > -1) {
+  if(demuxer->audio->id > -1 && demuxer->audio->id < ogg_d->num_sub) {
     os = &ogg_d->subs[demuxer->audio->id];
     if(os && os->vi_inited)
       vorbis_info_clear(&os->vi);