mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1237848 - Check lookahead ctx - r=rillian
Copied from https://chromium-review.googlesource.com/324510
This commit is contained in:
parent
9fed28582d
commit
422f564ea3
@ -181,6 +181,7 @@ vp8_lookahead_pop(struct lookahead_ctx *ctx,
|
||||
{
|
||||
struct lookahead_entry* buf = NULL;
|
||||
|
||||
assert(ctx != NULL);
|
||||
if(ctx->sz && (drain || ctx->sz == ctx->max_sz - 1))
|
||||
{
|
||||
buf = pop(ctx, &ctx->read_idx);
|
||||
|
@ -207,7 +207,7 @@ struct lookahead_entry *vp9_lookahead_pop(struct lookahead_ctx *ctx,
|
||||
int drain) {
|
||||
struct lookahead_entry *buf = NULL;
|
||||
|
||||
if (ctx->sz && (drain || ctx->sz == ctx->max_sz - MAX_PRE_FRAMES)) {
|
||||
if (ctx && ctx->sz && (drain || ctx->sz == ctx->max_sz - MAX_PRE_FRAMES)) {
|
||||
buf = pop(ctx, &ctx->read_idx);
|
||||
ctx->sz--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user