From 4af33eda76a9d11c67615852b50d72ff5f8a7bb3 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Wed, 14 Oct 2020 19:04:44 +0800 Subject: [PATCH] va: basedec: Create the other pool anyway. Fix a bug in _create_other_pool(). The old way of checking the base->other_pool make that other_pool never be changed until the gst_va_base_dec_stop() to stop the current decoding context. But in some stream, the resolution may change during the decoding process, and we need to re-negotiate the buffer pool. Then, the old other_pool can not be clean correctly and the new correct one can not be created. Part-of: --- sys/va/gstvabasedec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/va/gstvabasedec.c b/sys/va/gstvabasedec.c index cb94a31003..e544c3b0f4 100644 --- a/sys/va/gstvabasedec.c +++ b/sys/va/gstvabasedec.c @@ -181,8 +181,7 @@ _create_other_pool (GstVaBaseDec * base, GstAllocator * allocator, GstBufferPool *pool; GstStructure *config; - if (base->other_pool) - return; + gst_clear_object (&base->other_pool); GST_DEBUG_OBJECT (base, "making new other pool for copy");