diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-10 04:37:26 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-10 04:37:26 +0000 |
commit | ef37a3be9cf9ab766f3ed0b2307cdbc4ac48c97a (patch) | |
tree | c8bc6a76f0a7a87d6b539ac99d40f8f193dcdfec | |
parent | 5319009dfe90c32f73c1400d265c59adaf89f5d4 (diff) | |
download | mpv-ef37a3be9cf9ab766f3ed0b2307cdbc4ac48c97a.tar.bz2 mpv-ef37a3be9cf9ab766f3ed0b2307cdbc4ac48c97a.tar.xz |
Move temp variable declaration into inner loop scope.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25332 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_mkv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 00acc803d7..2f9424c9d8 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -306,13 +306,14 @@ vobsub_parse_size (sh_sub_t *sh, const char *start) 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 @@ vobsub_parse_custom_colors (sh_sub_t *sh, const char *start) 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); |