mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
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:
parent
f9af93d841
commit
9011a58491
1 changed files with 7 additions and 1 deletions
|
@ -198,7 +198,13 @@ _fill_ref_pic_list (VAPictureH264 va_reflist[32], GArray * reflist)
|
||||||
|
|
||||||
for (i = 0; i < reflist->len; i++) {
|
for (i = 0; i < reflist->len; i++) {
|
||||||
GstH264Picture *picture = g_array_index (reflist, GstH264Picture *, 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++)
|
for (; i < 32; i++)
|
||||||
|
|
Loading…
Reference in a new issue