Commit a5762191 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "vp8_init: fix NULL dereference on allocation error"

parents 08348d9c 798c5b14
......@@ -211,9 +211,8 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx,
mmap.flags = vp8_mem_req_segs[0].flags;
res = vp8_mmap_alloc(&mmap);
if (res != VPX_CODEC_OK) return res;
if (!res)
{
vp8_init_ctx(ctx, &mmap);
/* initialize number of fragments to zero */
......@@ -226,7 +225,6 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx,
ctx->priv->alg_priv->defer_alloc = 1;
/*post processing level initialized to do nothing */
}
}
ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads =
(ctx->priv->alg_priv->base.init_flags &
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment