From 009192bde4e2af27070a73ffdac56cc6cb495e37 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Tue, 29 Jul 2025 11:42:54 +0100 Subject: [PATCH] vavp9dec: Always chain to parent class negotiate vmethod When the base videodecoder class re-attempts a negotiation after flush, the vabasedec `need_negotiation` flag isn't necessarily set to TRUE, because in that situation the input state hasn't changed. By always chaining up we are sure that buffer pool negotiation will always be attempted. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvavp9dec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavp9dec.c b/subprojects/gst-plugins-bad/sys/va/gstvavp9dec.c index 7388ddb9fb..25a014cde1 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavp9dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavp9dec.c @@ -555,9 +555,12 @@ gst_va_vp9_dec_negotiate (GstVideoDecoder * decoder) GstVaVp9Dec *self = GST_VA_VP9_DEC (decoder); gboolean need_open; - /* Ignore downstream renegotiation request. */ - if (!base->need_negotiation) - return TRUE; + /* Do not (re-)open the decoder in case the input state hasn't changed. */ + if (!base->need_negotiation) { + GST_DEBUG_OBJECT (decoder, + "Input state hasn't changed, no need to (re-)open the decoder"); + goto done; + } base->need_negotiation = FALSE; @@ -601,6 +604,7 @@ gst_va_vp9_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_base_dec_set_output_state (base)) return FALSE; +done: return GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (decoder); }