[MPlayer-cvslog] r19467 - trunk/Gui/mplayer/gtk/menu.c

gpoirier subversion at mplayerhq.hu
Sun Aug 20 20:52:55 CEST 2006


Author: gpoirier
Date: Sun Aug 20 20:52:55 2006
New Revision: 19467

Modified:
   trunk/Gui/mplayer/gtk/menu.c

Log:
Fix audio stream selection in Gtk GUI
Patch by Rich % rincebrain A gmail P com %
Original Thred:
Date: Aug 19, 2006 11:33 AM
Subject: [MPlayer-dev-eng] [PATCH] Fix audio stream selection in Gtk GUI


Modified: trunk/Gui/mplayer/gtk/menu.c
==============================================================================
--- trunk/Gui/mplayer/gtk/menu.c	(original)
+++ trunk/Gui/mplayer/gtk/menu.c	Sun Aug 20 20:52:55 2006
@@ -546,13 +546,20 @@
     
     if ( c > 1 )
      {
+      int basedec = 0;
+      int setdec = 0;
       SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack );
       for ( i=0;i < MAX_A_STREAMS;i++ )
        if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] )
         {
          char tmp[32];
-         snprintf( tmp,32,MSGTR_MENU_Track,i );
-         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( i << 16 ) + evSetAudio );
+         if (!(setdec) )
+           {
+           basedec = (i > 1 ? i : 1);
+           setdec = 1;
+           }
+         snprintf( tmp,32,MSGTR_MENU_Track,(i-(basedec-1)) );
+         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( (i-basedec) << 16 ) + evSetAudio );
         }
      }
 



More information about the MPlayer-cvslog mailing list