diff libmpdemux/demux_mkv.c @ 25304:fb719ee583b5

Move temp variable declaration into inner loop scope.
author ulion
date Mon, 10 Dec 2007 04:37:26 +0000
parents 23894348d1e5
children 7957b8762195
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Mon Dec 10 01:46:02 2007 +0000
+++ b/libmpdemux/demux_mkv.c	Mon Dec 10 04:37:26 2007 +0000
@@ -306,13 +306,14 @@
 static int
 vobsub_parse_palette (sh_sub_t *sh, const char *start)
 {
-  int i, tmp;
+  int i;
 
   start += 8;
   while (isspace(*start))
     start++;
   for (i = 0; i < 16; i++)
     {
+      unsigned int tmp;
       if (sscanf(start, "%06x", &tmp) != 1)
         break;
       sh->palette[i] = vobsub_palette_to_yuv(tmp);
@@ -356,12 +357,12 @@
           use_custom_colors ? "ON" : "OFF");
    if ((start = strstr(start, "colors:")) != NULL)
      {
-       unsigned int tmp;
        start += 7;
        while (isspace(*start))
          start++;
        for (i = 0; i < 4; i++)
          {
+           unsigned int tmp;
            if (sscanf(start, "%06x", &tmp) != 1)
              break;
            sh->colors[i] = vobsub_rgb_to_yuv(tmp);