v4l2videodec: only set latency if the frame duration is valid
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 16 Mar 2016 15:24:55 +0000 (16:24 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 5 Apr 2017 13:20:19 +0000 (09:20 -0400)
commit1d43f6d852c2114f230fdfb075c211720e175c3d
tree320b14d46be813e157df4b61aebc83afc82f83c2
parentb30dee98e694f0977192441a969e610b4adb15ec
v4l2videodec: only set latency if the frame duration is valid

If the duration of the v4l2object is GST_CLOCK_TIME_NONE, because the
sink did not specify a framerate in the caps and the driver accepts the
framerate, the decoder element uses GST_CLOCK_TIME_NONE to calculate and
set the element latency.

While this is a bug of the capture driver, the decoder element should
not use the invalid duration to calculate a latency, but print a warning
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=779466
sys/v4l2/gstv4l2videodec.c