diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-23 11:07:58 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-23 11:07:58 +0000 |
commit | a32e00516f59993a90dc52dc470d027bb7f491d8 (patch) | |
tree | 145b82a780d5aef49474d45827eb24f2906afa6f | |
parent | 69f718e99ad259be3f0c5f6e52099ccb415d9d7f (diff) | |
download | mpv-a32e00516f59993a90dc52dc470d027bb7f491d8.tar.bz2 mpv-a32e00516f59993a90dc52dc470d027bb7f491d8.tar.xz |
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
-rw-r--r-- | mplayer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |