From f498ba25da3f8d68848af2ef7073198dffe70044 Mon Sep 17 00:00:00 2001 From: "Lim, Siew Hoon" Date: Thu, 27 Jun 2024 13:59:40 +0800 Subject: [PATCH] vabasedec: Initialize the allocation related variables in decide_allocation() Prevent garbage value has been pass thru and causing pipeline fail to run. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvabasedec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c index 736163e7f2..bb3ef37d9a 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c @@ -266,7 +266,7 @@ _decide_allocation_for_video_crop (GstVideoDecoder * decoder, GstQuery * query, GstCaps * caps) { GstAllocator *allocator = NULL, *other_allocator = NULL; - GstAllocationParams other_params, params; + GstAllocationParams other_params = { 0, }, params = { 0, }; gboolean update_pool = FALSE, update_allocator = FALSE; GstBufferPool *pool = NULL, *other_pool = NULL; guint size = 0, min, max, usage_hint; @@ -475,7 +475,7 @@ static gboolean gst_va_base_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query) { GstAllocator *allocator = NULL, *other_allocator = NULL; - GstAllocationParams other_params, params; + GstAllocationParams other_params = { 0, }, params = { 0, }; GstBufferPool *pool = NULL, *other_pool = NULL; GstCaps *caps = NULL; GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);