# HG changeset patch # User ib # Date 1309344583 0 # Node ID ca6c9a80a0624192e8b2c8ea53f4c485adaa2c26 # Parent e86e784f5f622d2132c3ee5972a5b639cd22b13b Make assignments to variables in guiGetEvent() only if needed. diff -r e86e784f5f62 -r ca6c9a80a062 gui/interface.c --- a/gui/interface.c Wed Jun 29 10:48:55 2011 +0000 +++ b/gui/interface.c Wed Jun 29 10:49:43 2011 +0000 @@ -552,11 +552,9 @@ int guiGetEvent(int type, void *arg) { mixer_t *mixer = NULL; - - stream_t *stream = arg; - + stream_t *stream; #ifdef CONFIG_DVDREAD - dvd_priv_t *dvdp = arg; + dvd_priv_t *dvdp; #endif if (guiInfo.mpcontext) @@ -640,6 +638,7 @@ #ifdef CONFIG_DVDREAD case guiSetDVD: + dvdp = arg; guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; @@ -656,6 +655,7 @@ case guiSetStream: + stream = arg; guiInfo.StreamType = stream->type; switch (stream->type) {