Move CONFIG_SIZE_LIMIT check in yv12config.c.
authorTom Finegan <tomfinegan@google.com>
Thu, 26 Jul 2018 20:54:41 +0000 (13:54 -0700)
committerTom Finegan <tomfinegan@google.com>
Thu, 26 Jul 2018 20:59:21 +0000 (13:59 -0700)
Avoids a C90 compile error.

BUG=webm:1551

Change-Id: Iee0f208de053c2a399aafa015d370c0496878816

vpx_scale/generic/yv12config.c

index 0fdba7b170dc979132a4a9d0e00aedffb7c9c44e..db1db37ce6d674733487c78203117cc0c522ccd7 100644 (file)
@@ -142,11 +142,11 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
                              int border, int byte_alignment,
                              vpx_codec_frame_buffer_t *fb,
                              vpx_get_frame_buffer_cb_fn_t cb, void *cb_priv) {
-  if (ybf) {
 #if CONFIG_SIZE_LIMIT
-    if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) return -1;
+  if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) return -1;
 #endif
 
+  if (ybf) {
     const int vp9_byte_align = (byte_alignment == 0) ? 1 : byte_alignment;
     const int aligned_width = (width + 7) & ~7;
     const int aligned_height = (height + 7) & ~7;