mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
Fix audio stream switching with demux_mkv:
return value of demuxer_switch_audio is new stream number for -aid, the index in a_streams array is in demuxer->audio->id instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19951 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
69f718e99a
commit
a32e00516f
@ -5099,10 +5099,10 @@ if(step_sec>0) {
|
||||
case MP_CMD_SWITCH_AUDIO : {
|
||||
int current_id = demuxer->audio->id;
|
||||
int v = demuxer_switch_audio(demuxer, cmd->args[0].v.i);
|
||||
if(v > -1 && v < MAX_A_STREAMS && v != current_id) {
|
||||
if(v > -1 && demuxer->audio->id != current_id) {
|
||||
sh_audio_t *sh2;
|
||||
uninit_player(INITED_AO | INITED_ACODEC);
|
||||
sh2 = demuxer->a_streams[v];
|
||||
sh2 = demuxer->a_streams[demuxer->audio->id];
|
||||
if(sh2) {
|
||||
sh2->ds = demuxer->audio;
|
||||
sh_audio = sh2;
|
||||
|
Loading…
Reference in New Issue
Block a user