vah264dec: Allow missing reference picture

baseclass might provide reference picture list with null picture.
Ensure picture before filling picture information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1809>
This commit is contained in:
Seungha Yang 2020-11-14 03:20:19 +09:00 committed by GStreamer Merge Bot
parent f9af93d841
commit 9011a58491

View file

@ -198,7 +198,13 @@ _fill_ref_pic_list (VAPictureH264 va_reflist[32], GArray * reflist)
for (i = 0; i < reflist->len; i++) {
GstH264Picture *picture = g_array_index (reflist, GstH264Picture *, i);
_fill_vaapi_pic (&va_reflist[i], picture);
if (picture) {
_fill_vaapi_pic (&va_reflist[i], picture);
} else {
/* list might include null picture if reference picture was missing */
_init_vaapi_pic (&va_reflist[i]);
}
}
for (; i < 32; i++)