From 976356e159bba917d1e38587c74eee5028b5358d Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 1 Apr 2022 22:47:07 +0800 Subject: [PATCH] va: h264enc: Do not use USAGE_HINT_ENCODER for input pool. It seems that the VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER is used only for the recon surfaces, if we set this flags for input raw surfaces, the alignment is wrong and we get broken result. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvah264enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c index a40f8a4..b514c3b 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c @@ -3144,7 +3144,7 @@ _get_sinkpad_pool (GstVaH264Enc * self) { GstAllocator *allocator; GstAllocationParams params = { 0, }; - guint size, usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER; + guint size, usage_hint = 0; GArray *surface_formats = NULL; GstCaps *caps; @@ -3691,7 +3691,7 @@ gst_va_h264_enc_propose_allocation (GstVideoEncoder * venc, GstQuery * query) GstCaps *caps; GstVideoInfo info; gboolean need_pool = FALSE; - guint size, usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER; + guint size, usage_hint = 0; gst_query_parse_allocation (query, &caps, &need_pool); if (!caps) -- 2.7.4