summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-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;