From: Yaowu Xu Date: Mon, 21 Nov 2016 18:49:56 +0000 (-0800) Subject: Add validation of frame_parallel_decoding_mode X-Git-Tag: v1.6.1~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ffbb36ddc5a1be8ee38ab3bdc663fd5ea99da78;p=libvpx Add validation of frame_parallel_decoding_mode This is a boolean value that is written into bitstream, any value other than 0 or 1 could have led to unexpected behavior. This commit fix the issue by adding validation of the value to make sure it is boolean. BUG=webm:1339 Change-Id: I2d3e69e8dbefcab9a0db9cb39a91a40ce531c5a1 --- diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index a797b2c26..4e8e40440 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -157,6 +157,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, RANGE_CHECK_HI(cfg, rc_max_quantizer, 63); RANGE_CHECK_HI(cfg, rc_min_quantizer, cfg->rc_max_quantizer); RANGE_CHECK_BOOL(extra_cfg, lossless); + RANGE_CHECK_BOOL(extra_cfg, frame_parallel_decoding_mode); RANGE_CHECK(extra_cfg, aq_mode, 0, AQ_MODE_COUNT - 2); RANGE_CHECK(extra_cfg, alt_ref_aq, 0, 1); RANGE_CHECK(extra_cfg, frame_periodic_boost, 0, 1);