va: allocator: replace assert with error log in va alloc.

We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
This commit is contained in:
He Junyan 2021-02-23 13:47:29 +08:00
parent 8794f4b713
commit 430aa327a8

View file

@ -1381,7 +1381,10 @@ gst_va_allocator_alloc (GstAllocator * allocator)
self = GST_VA_ALLOCATOR (allocator);
g_return_val_if_fail (self->rt_format != 0, NULL);
if (self->fourcc == 0 || self->rt_format == 0) {
GST_ERROR_OBJECT (self, "Unknown fourcc or chroma format");
return NULL;
}
if (!_create_surfaces (self->display, self->rt_format, self->fourcc,
GST_VIDEO_INFO_WIDTH (&self->info),