summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-09-23 11:07:58 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-09-23 11:07:58 +0000
commita32e00516f59993a90dc52dc470d027bb7f491d8 (patch)
tree145b82a780d5aef49474d45827eb24f2906afa6f
parent69f718e99ad259be3f0c5f6e52099ccb415d9d7f (diff)
downloadmpv-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index ad8de687e7..1bf9b81a18 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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;