[MPlayer-cvslog] r21829 - trunk/libmpdemux/demux_ogg.c

reimar subversion at mplayerhq.hu
Fri Jan 5 19:02:19 CET 2007


Author: reimar
Date: Fri Jan  5 19:02:18 2007
New Revision: 21829

Modified:
   trunk/libmpdemux/demux_ogg.c

Log:
Do not access ogg_d->subs after freeing it.


Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c	(original)
+++ trunk/libmpdemux/demux_ogg.c	Fri Jan  5 19:02:18 2007
@@ -1600,7 +1600,12 @@
   if(ogg_d->subs)
   {
     for (i = 0; i < ogg_d->num_sub; i++)
+    {
+      os = &ogg_d->subs[i];
       ogg_stream_clear(&ogg_d->subs[i].stream);
+      if(os->vi_inited)
+        vorbis_info_clear(&os->vi);
+    }
     free(ogg_d->subs);
   }
   if(ogg_d->syncpoints)
@@ -1612,11 +1617,6 @@
       if (ogg_d->text_langs[i]) free(ogg_d->text_langs[i]);
     free(ogg_d->text_langs);
   }
-  if(demuxer->audio->id > -1 && demuxer->audio->id < ogg_d->num_sub) {
-    os = &ogg_d->subs[demuxer->audio->id];
-    if(os->vi_inited)
-      vorbis_info_clear(&os->vi);
-  }
   free(ogg_d);
 }
 



More information about the MPlayer-cvslog mailing list