diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-04-02 22:26:03 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-04-02 22:26:03 +0300 |
commit | 1bda89eabac6414d5f0f34d445793e9745b74e94 (patch) | |
tree | c72e165e3570ea9b8c9f2cf74d19ca027384e64e /mplayer.c | |
parent | adc941419db43f457e99ba3f97db520e3417219b (diff) | |
download | mpv-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.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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)){ |