diff options
Diffstat (limited to 'third_party/aom/aom_scale/generic/yv12config.c')
-rw-r--r-- | third_party/aom/aom_scale/generic/yv12config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/third_party/aom/aom_scale/generic/yv12config.c b/third_party/aom/aom_scale/generic/yv12config.c index cce9151652..ca5b690667 100644 --- a/third_party/aom/aom_scale/generic/yv12config.c +++ b/third_party/aom/aom_scale/generic/yv12config.c @@ -51,6 +51,10 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, aom_codec_frame_buffer_t *fb, aom_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; +#endif + const int aom_byte_align = (byte_alignment == 0) ? 1 : byte_alignment; const int aligned_width = (width + 7) & ~7; const int aligned_height = (height + 7) & ~7; @@ -154,7 +158,7 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, (uv_border_h * uv_stride) + uv_border_w, aom_byte_align); - ybf->use_external_refernce_buffers = 0; + ybf->use_external_reference_buffers = 0; if (use_highbitdepth) { if (ybf->y_buffer_8bit) aom_free(ybf->y_buffer_8bit); |