mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19467 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c940e28bfb
commit
18f18eb2dc
@ -546,13 +546,20 @@ GtkWidget * create_PopUpMenu( void )
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user