From c118ae11ab9a25f450926c9e23fee6c510fb6ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 13 Nov 2020 20:25:36 +0100 Subject: [PATCH] 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: --- sys/va/gstvaallocator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/va/gstvaallocator.c b/sys/va/gstvaallocator.c index 0aeb75e80f..d2b59de102 100644 --- a/sys/va/gstvaallocator.c +++ b/sys/va/gstvaallocator.c @@ -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));