Browse code

Silence a warning when compiling Escape 130 decoder.

Fixes:
libavcodec/escape130.c:177:17: warning: ISO C90 forbids mixed declarations and code

Reviewed-by: Paul B Mahol

Carl Eugen Hoyos authored on 2011/12/09 01:14:47
Showing 1 changed files
... ...
@@ -171,9 +171,6 @@ static int escape130_decode_frame(AVCodecContext *avctx,
171 171
             }
172 172
         } else {
173 173
             if (get_bits1(&gb)) {
174
-                unsigned sign_selector = get_bits(&gb, 6);
175
-                unsigned difference_selector = get_bits(&gb, 2);
176
-                y_base = 2 * get_bits(&gb, 5);
177 174
                 static const uint8_t offset_table[] = {2, 4, 10, 20};
178 175
                 static const int8_t sign_table[64][4] =
179 176
                     { {0, 0, 0, 0},
... ...
@@ -233,6 +230,9 @@ static int escape130_decode_frame(AVCodecContext *avctx,
233 233
                       {1, 1, -1, -1},
234 234
                       {-1, 1, -1, -1},
235 235
                       {1, -1, -1, -1} };
236
+                unsigned sign_selector = get_bits(&gb, 6);
237
+                unsigned difference_selector = get_bits(&gb, 2);
238
+                y_base = 2 * get_bits(&gb, 5);
236 239
                 for (i = 0; i < 4; i++) {
237 240
                     y[i] = av_clip((int)y_base + offset_table[difference_selector] *
238 241
                                             sign_table[sign_selector][i], 0, 63);