# HG changeset patch # User ib # Date 1299589950 0 # Node ID d9363dbd3f837d0625275267bcd7c5b51ac5be95 # Parent 1f51f39916e15514dada043e4bddd618a075f759 Avoid mixing declaration and code. Additionally, move assignment where variable is used. diff -r 1f51f39916e1 -r d9363dbd3f83 gui/mplayer/gui_common.c --- a/gui/mplayer/gui_common.c Tue Mar 08 13:03:22 2011 +0000 +++ b/gui/mplayer/gui_common.c Tue Mar 08 13:12:30 2011 +0000 @@ -109,12 +109,12 @@ /* Unsafe! Pass only null-terminated strings as (char *)str. */ char *Translate(char *str) { - mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); static char trbuf[512]; char tmp[512]; int i, c; int t; int strsize = 0; + mixer_t *mixer; memset(trbuf, 0, 512); memset(tmp, 0, 128); @@ -245,6 +245,8 @@ case 'a': + mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + if (mixer->muted) { av_strlcat(trbuf, "n", sizeof(trbuf)); break;