]> granicus.if.org Git - libvpx/commitdiff
vp8_create_decoder_instances: correct pbi[] memset
authorJames Zern <jzern@google.com>
Fri, 3 Mar 2017 23:23:32 +0000 (15:23 -0800)
committerJames Zern <jzern@google.com>
Fri, 3 Mar 2017 23:23:32 +0000 (15:23 -0800)
clear the entire array on error. the size used previously was equal to
the number of elements.

BUG=webm:1364

Change-Id: I2f2e16ed6e867f41d4774a5a8ac9cedaee11ce46

vp8/decoder/onyxd_if.c

index 552c4943775482581bcf6775f19b5006a6ffb876..789c2eeffd32e68f836c527faf32b0e1b3a9c50a 100644 (file)
@@ -446,7 +446,7 @@ int vp8_create_decoder_instances(struct frame_buffers *fb, VP8D_CONFIG *oxcf) {
 #if CONFIG_MULTITHREAD
   if (setjmp(fb->pbi[0]->common.error.jmp)) {
     vp8_remove_decoder_instances(fb);
-    memset(fb->pbi, 0, sizeof(fb->pbi) / sizeof(fb->pbi[0]));
+    memset(fb->pbi, 0, sizeof(fb->pbi));
     vpx_clear_system_state();
     return VPX_CODEC_ERROR;
   }