Mercurial > mplayer.hg
changeset 19945:15ae9558e41e
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.
author | reimar |
---|---|
date | Sat, 23 Sep 2006 11:07:58 +0000 |
parents | 44193c0a688f |
children | ef94dfe93fe8 |
files | mplayer.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Sat Sep 23 10:42:03 2006 +0000 +++ b/mplayer.c Sat Sep 23 11:07:58 2006 +0000 @@ -5099,10 +5099,10 @@ 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;