summaryrefslogtreecommitdiffstats
path: root/media/libvpx/1237848-check-lookahead-ctx.patch
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/libvpx/1237848-check-lookahead-ctx.patch
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libvpx/1237848-check-lookahead-ctx.patch')
-rw-r--r--media/libvpx/1237848-check-lookahead-ctx.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/media/libvpx/1237848-check-lookahead-ctx.patch b/media/libvpx/1237848-check-lookahead-ctx.patch
new file mode 100644
index 000000000..a2ebe5cd7
--- /dev/null
+++ b/media/libvpx/1237848-check-lookahead-ctx.patch
@@ -0,0 +1,50 @@
+# HG changeset patch
+# User Gerald Squelart <gsquelart@mozilla.com>
+# Parent 5f9ba76eb3b1fd9377bbdb4cc2f98a7e75eabdfb
+Bug 1237848 - Check lookahead ctx - r=rillian
+
+Copied from https://chromium-review.googlesource.com/324510
+
+diff --git a/media/libvpx/vp8/encoder/lookahead.c b/media/libvpx/vp8/encoder/lookahead.c
+--- a/media/libvpx/vp8/encoder/lookahead.c
++++ b/media/libvpx/vp8/encoder/lookahead.c
+@@ -176,16 +176,17 @@ vp8_lookahead_push(struct lookahead_ctx
+
+
+ struct lookahead_entry*
+ vp8_lookahead_pop(struct lookahead_ctx *ctx,
+ int drain)
+ {
+ struct lookahead_entry* buf = NULL;
+
++ assert(ctx != NULL);
+ if(ctx->sz && (drain || ctx->sz == ctx->max_sz - 1))
+ {
+ buf = pop(ctx, &ctx->read_idx);
+ ctx->sz--;
+ }
+ return buf;
+ }
+
+diff --git a/media/libvpx/vp9/encoder/vp9_lookahead.c b/media/libvpx/vp9/encoder/vp9_lookahead.c
+--- a/media/libvpx/vp9/encoder/vp9_lookahead.c
++++ b/media/libvpx/vp9/encoder/vp9_lookahead.c
+@@ -202,17 +202,17 @@ int vp9_lookahead_push(struct lookahead_
+ return 0;
+ }
+
+
+ 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--;
+ }
+ return buf;
+ }
+
+
+ struct lookahead_entry *vp9_lookahead_peek(struct lookahead_ctx *ctx,