vp9_row_mt_alloc_rd_thresh: check alloc
authorJames Zern <jzern@google.com>
Wed, 27 Apr 2022 05:18:21 +0000 (22:18 -0700)
committerJames Zern <jzern@google.com>
Wed, 27 Apr 2022 05:22:33 +0000 (22:22 -0700)
Change-Id: I6fb7771d9fa6ec54d81f24a02a289e8b852e7332

vp9/encoder/vp9_multi_thread.c

index 6078f89..45659f2 100644 (file)
@@ -58,9 +58,10 @@ void vp9_row_mt_alloc_rd_thresh(VP9_COMP *const cpi,
       (mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2) + 1;
   int i;
 
-  this_tile->row_base_thresh_freq_fact =
+  CHECK_MEM_ERROR(
+      cm, this_tile->row_base_thresh_freq_fact,
       (int *)vpx_calloc(sb_rows * BLOCK_SIZES * MAX_MODES,
-                        sizeof(*(this_tile->row_base_thresh_freq_fact)));
+                        sizeof(*(this_tile->row_base_thresh_freq_fact))));
   for (i = 0; i < sb_rows * BLOCK_SIZES * MAX_MODES; i++)
     this_tile->row_base_thresh_freq_fact[i] = RD_THRESH_INIT_FACT;
 }