va: Add modifier paramters check for va_create_surfaces()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5267>
This commit is contained in:
He Junyan 2023-09-01 17:26:51 +08:00
parent 2c4cb82afc
commit 732a32a243

View file

@ -81,6 +81,8 @@ va_create_surfaces (GstVaDisplay * display, guint rt_format, guint fourcc,
guint num_attrs = 2;
g_return_val_if_fail (num_surfaces > 0, FALSE);
/* must have modifiers when num_modifiers > 0 */
g_return_val_if_fail (num_modifiers == 0 || modifiers, FALSE);
if (fourcc > 0) {
/* *INDENT-OFF* */