mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 20:00:37 +00:00
fix crash with invalid -vid and no audio stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17219 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
772ebb6456
commit
f8c0e0cf04
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user