va: allocator: dmabuf: log unknown surface format

It is possible that surface format is not assigned, keeping its default
GStreamer value: unknown, but gst_video_format_to_string() doesn't print
unknown format, so this patch does it manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1811>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-11-13 20:25:36 +01:00
parent a1e8cb76e7
commit c118ae11ab

View file

@ -1348,7 +1348,8 @@ gst_va_allocator_try (GstAllocator * allocator)
GST_INFO_OBJECT (self,
"va allocator info, surface format: %s, image format: %s, "
"use derived: %s, rt format: 0x%x, fourcc: %" GST_FOURCC_FORMAT,
gst_video_format_to_string (self->surface_format),
(self->surface_format == GST_VIDEO_FORMAT_UNKNOWN) ? "unknown"
: gst_video_format_to_string (self->surface_format),
gst_video_format_to_string (self->img_format),
self->use_derived ? "true" : "false", self->rt_format,
GST_FOURCC_ARGS (self->fourcc));