core: apply audio track options to all ordered chapter files

Options selecting audio track to play (-nosound, -alang, -aid) only
affected the first source file. When you moved to a timeline part that
came from another file the default audio track for that file was used.
Add code to apply the options to all files.
This commit is contained in:
Uoti Urpala 2010-05-22 00:18:13 +03:00
parent b3a688d45f
commit e2f894852c
1 changed files with 6 additions and 1 deletions

View File

@ -3779,7 +3779,12 @@ if (ts_prog) {
mp_property_do("switch_program", M_PROPERTY_SET, &tmp, mpctx);
}
// select audio stream
select_audio(mpctx->demuxer, opts->audio_id, opts->audio_lang);
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->demuxer, opts->audio_id, opts->audio_lang);
// DUMP STREAMS:
if((stream_dump_type)&&(stream_dump_type<4)){