vajpegdec: 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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9457>
This commit is contained in:
Philippe Normand 2025-07-29 11:42:44 +01:00
parent 8317dd5ef3
commit eab8abad8c

View File

@ -360,9 +360,12 @@ gst_va_jpeg_dec_negotiate (GstVideoDecoder * decoder)
guint64 modifier;
GstCapsFeatures *capsfeatures = NULL;
/* 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;
@ -420,6 +423,7 @@ gst_va_jpeg_dec_negotiate (GstVideoDecoder * decoder)
GST_INFO_OBJECT (self, "Negotiated caps %" GST_PTR_FORMAT,
base->output_state->caps);
done:
return GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (decoder);
}