[MPlayer-cvslog] r33054 - trunk/gui/mplayer/gui_common.c

ib subversion at mplayerhq.hu
Tue Mar 8 14:12:30 CET 2011


Author: ib
Date: Tue Mar  8 14:12:30 2011
New Revision: 33054

Log:
Avoid mixing declaration and code.

Additionally, move assignment where variable is used.

Modified:
   trunk/gui/mplayer/gui_common.c

Modified: trunk/gui/mplayer/gui_common.c
==============================================================================
--- trunk/gui/mplayer/gui_common.c	Tue Mar  8 14:03:22 2011	(r33053)
+++ trunk/gui/mplayer/gui_common.c	Tue Mar  8 14:12:30 2011	(r33054)
@@ -109,12 +109,12 @@ static void TranslateFilename(int c, cha
 /* 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 @@ calclengthmmmmss:
 
             case 'a':
 
+                mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
+
                 if (mixer->muted) {
                     av_strlcat(trbuf, "n", sizeof(trbuf));
                     break;


More information about the MPlayer-cvslog mailing list