changeset 36699:51fccd9e0dc7

Simplify code. CreatePopUpMenu() already provides a variable for the demuxer, set by a call to mpctx_get_demuxer(). Use it.
author ib
date Fri, 07 Feb 2014 17:46:14 +0000
parents 6014c22afcd1
children 9f19f1bd34eb
files gui/dialog/menu.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/menu.c	Wed Feb 05 19:28:05 2014 +0000
+++ b/gui/dialog/menu.c	Fri Feb 07 17:46:14 2014 +0000
@@ -657,7 +657,7 @@
        if ( demuxer->a_streams[i] )
         {
          int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
-         int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(mpctx_get_demuxer(guiInfo.mpcontext))));
+         int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(demuxer)));
          char tmp[32];
          snprintf( tmp,32,MSGTR_GUI_TrackN,aid );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( aid << 16 ) + ivSetAudio );
@@ -675,7 +675,7 @@
         {
          int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
          char tmp[32];
-         int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(mpctx_get_demuxer(guiInfo.mpcontext))));
+         int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(demuxer)));
          snprintf( tmp,32,MSGTR_GUI_TrackN,vid );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( vid << 16 ) + ivSetVideo );
         }