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>
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];
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;