Mercurial > mplayer.hg
changeset 36700:9f19f1bd34eb
Simplify code.
Don't build DVD audio languages sub menu unless there is a demuxer.
Directly use demuxer's audio id then to emphasize the current audio
track.
author | ib |
---|---|
date | Fri, 07 Feb 2014 17:58:29 +0000 |
parents | 51fccd9e0dc7 |
children | eb1a6a0b268f |
files | gui/dialog/menu.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/menu.c Fri Feb 07 17:46:14 2014 +0000 +++ b/gui/dialog/menu.c Fri Feb 07 17:58:29 2014 +0000 @@ -525,17 +525,16 @@ gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audio_xpm, DVDSubMenu,MSGTR_GUI_AudioTracks ); - if ( guiInfo.AudioStreams && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) + if ( guiInfo.AudioStreams && demuxer && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) { - char tmp[64]; int i, id = demuxer ? demuxer->audio->id : audio_id; + char tmp[64]; int i; for ( i=0;i < guiInfo.AudioStreams;i++ ) { snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.AudioStream[i].language ), ChannelTypes[ guiInfo.AudioStream[i].type ], ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); -// if ( id == -1 ) id=audio_id; //guiInfo.AudioStream[i].id; AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, - id == guiInfo.AudioStream[i].id, + demuxer->audio->id == guiInfo.AudioStream[i].id, ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); } }