changeset 25304:fb719ee583b5

Move temp variable declaration into inner loop scope.
author ulion
date Mon, 10 Dec 2007 04:37:26 +0000
parents 9139c368a493
children 9e41b6f16189
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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);