shithub: libvpx

Download patch

ref: 921c347ef6b67f8ed2f02080d3941cce51d4acbb
parent: ee72b6915e777b34b431cc600ea8d75b81e24cab
author: James Zern <[email protected]>
date: Thu Sep 24 15:50:42 EDT 2015

vp9/10 decoder_remove: check pbi pointer

fixes crash on error

Change-Id: Ibb1ef5565fb833cdee1a49335473d98f1187ef43

--- a/vp10/decoder/decoder.c
+++ b/vp10/decoder/decoder.c
@@ -126,6 +126,9 @@
 void vp10_decoder_remove(VP10Decoder *pbi) {
   int i;
 
+  if (!pbi)
+    return;
+
   vpx_get_worker_interface()->end(&pbi->lf_worker);
   vpx_free(pbi->lf_worker.data1);
   vpx_free(pbi->tile_data);
--- a/vp9/decoder/vp9_decoder.c
+++ b/vp9/decoder/vp9_decoder.c
@@ -126,6 +126,9 @@
 void vp9_decoder_remove(VP9Decoder *pbi) {
   int i;
 
+  if (!pbi)
+    return;
+
   vpx_get_worker_interface()->end(&pbi->lf_worker);
   vpx_free(pbi->lf_worker.data1);
   vpx_free(pbi->tile_data);