diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2020-02-05 12:00:00 +0530 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-02-08 10:13:18 +0000 |
commit | b283cf63d344edbd91eca40ddf9557473d630eaf (patch) | |
tree | 9ff9c526cfa2562ffc123c52157d2cd5a9531905 | |
parent | c8234337c767f8bdf95e5648fe50e18ee94353e0 (diff) |
v4l2: fix crash on invalid caps
gst_v4l2_object_set_format_full() was returning FALSE without setting
an error. Caller code (gst_v4l2src_fixate()) was then derefing a
NULL pointer when trying to handle the error.
-rw-r--r-- | sys/v4l2/gstv4l2object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 8c3c95bb8..1cb0b2a71 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -3744,6 +3744,9 @@ invalid_caps: { GST_DEBUG_OBJECT (v4l2object->dbg_obj, "can't parse caps %" GST_PTR_FORMAT, caps); + + GST_V4L2_ERROR (error, RESOURCE, SETTINGS, + (_("Invalid caps")), ("Can't parse caps %" GST_PTR_FORMAT, caps)); return FALSE; } try_fmt_failed: |