]> granicus.if.org Git - libvpx/commitdiff
vp9 svc: Fix a valgrind error.
authorJackyChen <jackychen@google.com>
Tue, 2 Aug 2016 22:45:44 +0000 (15:45 -0700)
committerJackyChen <jackychen@google.com>
Tue, 2 Aug 2016 23:16:22 +0000 (16:16 -0700)
This error was introduced by the patch:
8ce67d7 vp9 svc: Enable different speed setting for each spatial layer.
To use svc, svc_param should be cleared to 0 at the beginning.

Change-Id: I222f03ddae8a50e84b4690b78263abb742fae91e

examples/vpx_temporal_svc_encoder.c

index d2e8726b10dae4281d2f8c21ebb3579f04a2ec6b..633cdf1f51c2326666a512e6ed8b67a3bab293e7 100644 (file)
@@ -706,6 +706,7 @@ int main(int argc, char **argv) {
     vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
   } else if (strncmp(encoder->name, "vp9", 3) == 0) {
     vpx_svc_extra_cfg_t svc_params;
+    memset(&svc_params, 0, sizeof(svc_params));
     vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
     vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
     vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);