gstv4l2tuner: return NULL if no norm set
authorRouven Czerwinski <rouven@czerwinskis.de>
Wed, 2 Feb 2022 11:49:29 +0000 (12:49 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 20 Feb 2022 21:38:40 +0000 (21:38 +0000)
commit748c5f357938156923c3379428dfabf619f0e97a
treeb1f979b86f127cb57a4df547ac83ab37ce9d4d96
parentd49454123ee23b0b65040091e8695b39ca605a23
gstv4l2tuner: return NULL if no norm set

If the video4linux device supports norms but has no norm set, norm is
returned as an uninitialized variable after the ioctl call, leading to
gst_v4l2_tuner_get_norm_by_std_id() returning a random norm from the
supported norms. Catch this case and instead return NULL to indicate
that no norm is setup.

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