diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c index e7e64ab44b..b18667f540 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c @@ -95,9 +95,12 @@ gst_va_av1_dec_negotiate (GstVideoDecoder * decoder) GstVaAV1Dec *self = GST_VA_AV1_DEC (decoder); GstVaBaseDec *base = GST_VA_BASE_DEC (decoder); - /* 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; @@ -128,6 +131,7 @@ gst_va_av1_dec_negotiate (GstVideoDecoder * decoder) } self->preferred_format = GST_VIDEO_INFO_FORMAT (&base->output_state->info); +done: return GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (decoder); }