[MPlayer-cvslog] CVS: main/libmpdemux demux_ogg.c,1.85,1.86

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Dec 18 12:55:50 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv10298

Modified Files:
	demux_ogg.c 
Log Message:
fix crash with invalid -vid and no audio stream


Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- demux_ogg.c	5 Dec 2005 01:25:31 -0000	1.85
+++ demux_ogg.c	18 Dec 2005 11:55:47 -0000	1.86
@@ -616,7 +616,7 @@
     if (((sh_video_t*)demuxer->video->sh)->format == FOURCC_THEORA)
       context = ((sh_video_t*)demuxer->video->sh)->context;
   }
-  else {
+  else if(demuxer->audio->id >= 0) {
     sid = demuxer->audio->id;
     /* demux_ogg_read_packet needs decoder context for Vorbis streams */
     if(((sh_audio_t*)demuxer->audio->sh)->format == FOURCC_VORBIS) {
@@ -624,6 +624,7 @@
       samplesize = ((sh_audio_t*)demuxer->audio->sh)->samplesize;
     }
   }
+  else return;
   os = &ogg_d->subs[sid];
   oss = &os->stream;
 




More information about the MPlayer-cvslog mailing list