summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-22 00:18:13 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-22 10:11:25 +0300
commite2f894852ce136c9fa5bee3b5d7fb75e8a880786 (patch)
tree7c11d6d29d84234d67cf3c5a677321b26a78d3ee /mplayer.c
parentb3a688d45ff463592c73c425d68532f8f9b7880d (diff)
downloadmpv-e2f894852ce136c9fa5bee3b5d7fb75e8a880786.tar.bz2
mpv-e2f894852ce136c9fa5bee3b5d7fb75e8a880786.tar.xz
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.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 6 insertions, 1 deletions
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)){