diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-18 11:55:47 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-18 11:55:47 +0000 |
commit | f8c0e0cf04e768bac5fb1f3f4dbbd3a7a6c205fc (patch) | |
tree | 762fafa9cba7e02fb9d102a0a79ab80a04b2ff21 /libmpdemux | |
parent | 772ebb64565c9001104533bfeef04c72b7f5016c (diff) |
fix crash with invalid -vid and no audio stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17219 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_ogg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 44f7f2f1de..084950bf53 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -616,7 +616,7 @@ void demux_ogg_scan_stream(demuxer_t* demuxer) { 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 @@ void demux_ogg_scan_stream(demuxer_t* demuxer) { samplesize = ((sh_audio_t*)demuxer->audio->sh)->samplesize; } } + else return; os = &ogg_d->subs[sid]; oss = &os->stream; |