va: allocator: No need of fourcc to create surface.

In commits 430aa327 and a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.

This regression is shown on radeonsi driver with certain color
formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-02-24 19:14:42 +01:00 committed by GStreamer Merge Bot
parent 87fe2e321e
commit a9211a5067

View file

@ -1394,7 +1394,7 @@ gst_va_allocator_alloc (GstAllocator * allocator)
self = GST_VA_ALLOCATOR (allocator);
if (self->fourcc == 0 || self->rt_format == 0) {
if (self->rt_format == 0) {
GST_ERROR_OBJECT (self, "Unknown fourcc or chroma format");
return NULL;
}
@ -1666,7 +1666,7 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
} else if (GST_IS_VA_ALLOCATOR (mem->allocator)) {
GstVaAllocator *self = GST_VA_ALLOCATOR (mem->allocator);
if (self->fourcc == 0 || self->rt_format == 0) {
if (self->rt_format == 0) {
GST_ERROR_OBJECT (self, "Unknown fourcc or chroma format");
return FALSE;
}