vaencoder: Fix caps semantics.

When using gst_va_caps_from_profiles() the semantics of sink/src caps
depends if the element is an encoder or a decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-10-21 10:57:39 +02:00 committed by GStreamer Marge Bot
parent d32fdf975d
commit ba24191f2a

View file

@ -847,7 +847,7 @@ _get_codec_caps (GstVaEncoder * self)
if (!gst_va_encoder_is_open (self) if (!gst_va_encoder_is_open (self)
&& GST_IS_VA_DISPLAY_WRAPPED (self->display)) { && GST_IS_VA_DISPLAY_WRAPPED (self->display)) {
if (gst_va_caps_from_profiles (self->display, self->available_profiles, if (gst_va_caps_from_profiles (self->display, self->available_profiles,
self->entrypoint, &sinkpad_caps, &srcpad_caps)) { self->entrypoint, &srcpad_caps, &sinkpad_caps)) {
gst_caps_replace (&self->sinkpad_caps, sinkpad_caps); gst_caps_replace (&self->sinkpad_caps, sinkpad_caps);
gst_caps_replace (&self->srcpad_caps, srcpad_caps); gst_caps_replace (&self->srcpad_caps, srcpad_caps);
gst_caps_unref (srcpad_caps); gst_caps_unref (srcpad_caps);