v4l2videodec: fix src side frame rate negotiation
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 24 Feb 2021 12:25:43 +0000 (13:25 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 24 Feb 2021 16:15:49 +0000 (17:15 +0100)
commite885e0e1d78b199280c8252cbf726b8a81393aba
tree04183fd8f2c6a2205468c9764ae9cf24a63b3691
parent1257e50d4983ad210ba9a5b753e397b33239a354
v4l2videodec: fix src side frame rate negotiation

Negotiating v4l2h264dec ! v4l2h264enc transcoding pipelines fails in
case the encoder does not accept framerate=(fraction)0/1.
The acquired caps used for downstream negotiation are determined from
gst_v4l2_object_acquire_format(), which sets the GstVideoInfo::fps_n
and ::fps_d fields to 0.
To fix this, copy the frame rate from the sink side.

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