Commit 93677107 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Nicolas Dufresne

v4l2object: Protect against zero PAR num/demu

This fixes an assertion when the driver implement CROPCAP but does
not set the PAR.
parent e69d2c8c
......@@ -4180,7 +4180,7 @@ gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, GstCaps * filter)
GST_WARNING_OBJECT (v4l2object->dbg_obj,
"Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: %s",
g_strerror (errno));
} else {
} else if (cropcap.pixelaspect.numerator && cropcap.pixelaspect.denominator) {
v4l2object->par = g_new0 (GValue, 1);
g_value_init (v4l2object->par, GST_TYPE_FRACTION);
gst_value_set_fraction (v4l2object->par, cropcap.pixelaspect.numerator,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment