From 1bda89eabac6414d5f0f34d445793e9745b74e94 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 2 Apr 2011 22:26:03 +0300 Subject: 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. --- mplayer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mplayer.c') 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)){ -- cgit v1.2.3