From e2c6b05f9aefcea86f22c393217b05f123cecf07 Mon Sep 17 00:00:00 2001
From: James Berry <jamesberry@google.com>
Date: Mon, 27 Feb 2012 14:41:43 -0500
Subject: [PATCH] bugfix: use oxcf width/height for reinit check

use oxcf instead of common in check to Reinit the
lookahead buffer if the frame size changes
prior behavior would cause assertion fail/crash

first observed in:
support changing resolution with vpx_codec_enc_config_set

Change-Id: Ib669916ca9b4f206d4cc3caab5107e49d39a36aa
---
 vp8/encoder/onyx_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 1082245d3f..6645442319 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4575,7 +4575,7 @@ int vp8_receive_raw_frame(VP8_COMP *cpi, unsigned int frame_flags, YV12_BUFFER_C
     vpx_usec_timer_start(&timer);
 
     /* Reinit the lookahead buffer if the frame size changes */
-    if (sd->y_width != cpi->common.Width || sd->y_height != cpi->common.Height)
+    if (sd->y_width != cpi->oxcf.Width || sd->y_height != cpi->oxcf.Height)
     {
         assert(cpi->oxcf.lag_in_frames < 2);
         dealloc_raw_frame_buffers(cpi);
-- 
GitLab