Commit c42a2814 authored by James Zern's avatar James Zern
Browse files

vp9_cx_iface,encoder_encode: check validate_img return

before calling vp9_apply_encoding_flags() which may crash if the
resolution was invalid. this is the same change as:
c0523090 vp8e_encode: check validate_config return

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1315288

Change-Id: Icd2aab322422e83d3a778fca6d7789e5000239d7
parent 159cc3b3
......@@ -1108,7 +1108,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx,
}
cpi->common.error.setjmp = 1;
vp9_apply_encoding_flags(cpi, flags);
if (res == VPX_CODEC_OK) vp9_apply_encoding_flags(cpi, flags);
// Handle fixed keyframe intervals
if (ctx->cfg.kf_mode == VPX_KF_AUTO &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment