summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-04-02 22:26:03 +0300
committerUoti Urpala <uau@mplayer2.org>2011-04-02 22:26:03 +0300
commit1bda89eabac6414d5f0f34d445793e9745b74e94 (patch)
treec72e165e3570ea9b8c9f2cf74d19ca027384e64e /mplayer.c
parentadc941419db43f457e99ba3f97db520e3417219b (diff)
downloadmpv-1bda89eabac6414d5f0f34d445793e9745b74e94.tar.bz2
mpv-1bda89eabac6414d5f0f34d445793e9745b74e94.tar.xz
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.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mplayer.c b/mplayer.c
index 542bae7309..826634f635 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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)){