mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 00:07:33 +00: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:
parent
adc941419d
commit
1bda89eaba
@ -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)){
|
||||
|
Loading…
Reference in New Issue
Block a user