summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-06-18 13:11:48 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-08-18 15:51:57 +0200
commitf3f49f2f0e6b3669d9b09341a11cf0b96e138674 (patch)
treef16eab43e896e5bd43408d8de62a4071c3155218
parent82d2ed8d7da3619c0ea467c06604f5626fc0b901 (diff)
downloadlibva-intel-driver-f3f49f2f0e6b3669d9b09341a11cf0b96e138674.tar.gz
libva-intel-driver-f3f49f2f0e6b3669d9b09341a11cf0b96e138674.tar.bz2
libva-intel-driver-f3f49f2f0e6b3669d9b09341a11cf0b96e138674.zip
decoder: h264: fix RefPicList0/1 without frame in DPB.
Some bitstreams (e.g. truncated, or non conformant), or bugs in codec layers, would incorrectly make decoders to fill in the RefPicList0/1 lists with surfaces that have not received any content yet. There is no reason for the driver to crash in such cases. https://bugs.freedesktop.org/show_bug.cgi?id=82466 Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--src/i965_decoder_utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/i965_decoder_utils.c b/src/i965_decoder_utils.c
index 546285e..7ea39dd 100644
--- a/src/i965_decoder_utils.c
+++ b/src/i965_decoder_utils.c
@@ -526,6 +526,8 @@ intel_update_avc_frame_store_index(
continue;
GenAvcSurface * const avc_surface = obj_surface->private_data;
+ if (!avc_surface)
+ continue;
if (avc_surface->frame_store_id >= 0) {
GenFrameStore * const fs =
&frame_store[avc_surface->frame_store_id];
@@ -559,6 +561,8 @@ intel_update_avc_frame_store_index(
continue;
GenAvcSurface * const avc_surface = obj_surface->private_data;
+ if (!avc_surface)
+ continue;
if (n < num_free_refs) {
GenFrameStore * const fs = free_refs[n++];
fs->surface_id = obj_surface->base.id;