# HG changeset patch # User reimar # Date 1134906947 0 # Node ID cffd0ec5d01ac1b95274d4a514caa013167c74cc # Parent 0d8eee43f85c6e13730101bba34b667e5495bff5 fix crash with invalid -vid and no audio stream diff -r 0d8eee43f85c -r cffd0ec5d01a libmpdemux/demux_ogg.c --- a/libmpdemux/demux_ogg.c Sun Dec 18 01:22:11 2005 +0000 +++ b/libmpdemux/demux_ogg.c Sun Dec 18 11:55:47 2005 +0000 @@ -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;