summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-03 10:33:11 +0200
committerwm4 <wm4@nowhere>2012-08-03 12:48:03 +0200
commitd722f8fe61296e5b277ed94be055bb9ef1c99e19 (patch)
treeee1fe97c5d3cc70b56023975b9e963a78d424d68
parente26b7314cf6751a5b2aafb9c29395711758e30b5 (diff)
downloadmpv-d722f8fe61296e5b277ed94be055bb9ef1c99e19.tar.bz2
mpv-d722f8fe61296e5b277ed94be055bb9ef1c99e19.tar.xz
command: make audio switching persistent across file switches
mp_property_audio switched the audio stream, but didn't store the newly requested audio ID to MPOpts.audio_id, which is used by --aid. This meant that the audio track would be reset when advancing to a new file. Change that to make it consistent with subtitle selection. (Whether this behavior is a good idea or not is a different question - maybe it's not a good idea, because tracks are essentially random, and this will disable default selection of tracks.)
-rw-r--r--command.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/command.c b/command.c
index ee9fcbc48e..0993a5a6b7 100644
--- a/command.c
+++ b/command.c
@@ -969,6 +969,7 @@ static int mp_property_audio(m_option_t *prop, int action, void *arg,
if (new_id != current_id)
uninit_player(mpctx, INITIALIZED_AO | INITIALIZED_ACODEC);
if (new_id != current_id && new_id >= 0) {
+ mpctx->opts.audio_id = new_id;
sh_audio_t *sh2;
sh2 = mpctx->d_audio->demuxer->a_streams[mpctx->d_audio->id];
sh2->ds = mpctx->d_audio;