diff options
author | wm4 <wm4@nowhere> | 2012-08-03 10:33:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 12:48:03 +0200 |
commit | d722f8fe61296e5b277ed94be055bb9ef1c99e19 (patch) | |
tree | ee1fe97c5d3cc70b56023975b9e963a78d424d68 | |
parent | e26b7314cf6751a5b2aafb9c29395711758e30b5 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |