v4l2: videodec: Prefer acquired caps over anything downstream
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 31 Mar 2023 14:32:54 +0000 (10:32 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 14 Apr 2023 15:16:06 +0000 (15:16 +0000)
commit85e679ce1afb325d7046759f4d9474cb9f17c72c
treed197dbf9918ac726c1928551456e96bac37abd36
parentda136b11460fbe19708ba8ed2975c96e2e2cbe34
v4l2: videodec: Prefer acquired caps over anything downstream

As we don't have anything smart in the fixation process, we may endup with
a format that has a lower bitdepth, even if downstream can handle higher
depth. it is notably the case when negotiating with deinterlace, which places
is non-passthrough caps before its passthrough one. This makes the generic
fixation prefer the formats natively supported by deinterlace element over
the HW 10bit format. As some HW can downscale 10bit to 8bit, this can break
10bit decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c