comparison gui/mplayer/gui_common.c @ 32967:d9363dbd3f83

Avoid mixing declaration and code. Additionally, move assignment where variable is used.
author ib
date Tue, 08 Mar 2011 13:12:30 +0000
parents 1f51f39916e1
children 1fa7a299b1b4
comparison
equal deleted inserted replaced
32966:1f51f39916e1 32967:d9363dbd3f83
107 } 107 }
108 108
109 /* Unsafe! Pass only null-terminated strings as (char *)str. */ 109 /* Unsafe! Pass only null-terminated strings as (char *)str. */
110 char *Translate(char *str) 110 char *Translate(char *str)
111 { 111 {
112 mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
113 static char trbuf[512]; 112 static char trbuf[512];
114 char tmp[512]; 113 char tmp[512];
115 int i, c; 114 int i, c;
116 int t; 115 int t;
117 int strsize = 0; 116 int strsize = 0;
117 mixer_t *mixer;
118 118
119 memset(trbuf, 0, 512); 119 memset(trbuf, 0, 512);
120 memset(tmp, 0, 128); 120 memset(tmp, 0, 128);
121 strsize = strlen(str); 121 strsize = strlen(str);
122 122
243 av_strlcat(trbuf, "e", sizeof(trbuf)); 243 av_strlcat(trbuf, "e", sizeof(trbuf));
244 break; 244 break;
245 245
246 case 'a': 246 case 'a':
247 247
248 mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
249
248 if (mixer->muted) { 250 if (mixer->muted) {
249 av_strlcat(trbuf, "n", sizeof(trbuf)); 251 av_strlcat(trbuf, "n", sizeof(trbuf));
250 break; 252 break;
251 } 253 }
252 254