shithub: libvpx

Download patch

ref: 6a908db22a174f2852aa7a84d2b4a1eee93cc1d6
parent: e55e3f80319e9cae14b91b649bc861b0b5297c53
author: Tom Finegan <tomfinegan@google.com>
date: Thu Jul 26 09:54:41 EDT 2018

Move CONFIG_SIZE_LIMIT check in yv12config.c.

Avoids a C90 compile error.

BUG=webm:1551

Change-Id: Iee0f208de053c2a399aafa015d370c0496878816

--- a/vpx_scale/generic/yv12config.c
+++ b/vpx_scale/generic/yv12config.c
@@ -142,11 +142,11 @@
                              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;