[MPlayer-cvslog] r19951 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Sat Sep 23 13:07:58 CEST 2006


Author: reimar
Date: Sat Sep 23 13:07:58 2006
New Revision: 19951

Modified:
   trunk/mplayer.c

Log:
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.


Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Sat Sep 23 13:07:58 2006
@@ -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;



More information about the MPlayer-cvslog mailing list