]> granicus.if.org Git - libvpx/commitdiff
Add validation of frame_parallel_decoding_mode
authorYaowu Xu <yaowu@google.com>
Mon, 21 Nov 2016 18:49:56 +0000 (10:49 -0800)
committerYaowu Xu <yaowu@google.com>
Mon, 21 Nov 2016 18:53:25 +0000 (10:53 -0800)
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

vp9/vp9_cx_iface.c

index a797b2c2624cc2916dd166e50c5044849325d86e..4e8e40440a1bb047b80a12e209d1cccabfb2034d 100644 (file)
@@ -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);