From e2f894852ce136c9fa5bee3b5d7fb75e8a880786 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 22 May 2010 00:18:13 +0300 Subject: 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. --- mplayer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 88e9167d88..0120c20c18 100644 --- a/mplayer.c +++ b/mplayer.c @@ -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)){ -- cgit v1.2.3