1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

core: do proper audio track selection for -audiofile demuxer

The select_audio() call was done on the main demuxer, not -audiofile
one (the "if (mpctx->num_sources)" test in the previous code was
always true). Call it on the -audiofile demuxer instead. The
-audiofile stuff still needs a proper cleanup later though.
This commit is contained in:
Uoti Urpala 2011-04-02 22:26:03 +03:00
parent adc941419d
commit 1bda89eaba

View File

@ -4608,12 +4608,9 @@ if (ts_prog) {
mp_property_do("switch_program", M_PROPERTY_SET, &tmp, mpctx);
}
// select audio stream
if (mpctx->num_sources)
for (int i = 0; i < mpctx->num_sources; i++)
select_audio(mpctx->sources[i].demuxer, opts->audio_id,
opts->audio_lang);
else
select_audio(mpctx->d_audio->demuxer, opts->audio_id, opts->audio_lang);
for (int i = 0; i < mpctx->num_sources; i++)
select_audio(mpctx->sources[i].demuxer->audio->demuxer, opts->audio_id,
opts->audio_lang);
// DUMP STREAMS:
if((stream_dump_type)&&(stream_dump_type<4)){