projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5ad890
)
simple_encode,init_encoder: check buffer_pool alloc
author
James Zern
<jzern@google.com>
Wed, 27 Apr 2022 02:16:11 +0000
(19:16 -0700)
committer
James Zern
<jzern@google.com>
Wed, 27 Apr 2022 02:18:15 +0000
(19:18 -0700)
Change-Id: I54f83733260abf828166400c5fd0c4c7e3ccec2f
vp9/simple_encode.cc
patch
|
blob
|
history
diff --git
a/vp9/simple_encode.cc
b/vp9/simple_encode.cc
index
1a0ada1
..
654699e
100644
(file)
--- a/
vp9/simple_encode.cc
+++ b/
vp9/simple_encode.cc
@@
-110,6
+110,7
@@
static VP9_COMP *init_encoder(const VP9EncoderConfig *oxcf,
vpx_img_fmt_t img_fmt) {
VP9_COMP *cpi;
BufferPool *buffer_pool = (BufferPool *)vpx_calloc(1, sizeof(*buffer_pool));
+ if (!buffer_pool) return NULL;
vp9_initialize_enc();
cpi = vp9_create_compressor(oxcf, buffer_pool);
vp9_update_compressor_with_img_fmt(cpi, img_fmt);