mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
v4l2object: Don't check size in a non-list value
After commit 1ea9735a
I see these error while using the webcam
integrated in my laptop:
GStreamer-CRITICAL **: gst_value_list_get_size: assertion 'GST_VALUE_HOLDS_LIST (value)' failed
The issue is gst_v4l2src_value_simplify() was doing its job of
generating a single value, rather than the original list. That why,
when getting the list size, a critical warning was raised.
This patch takes advantage of the compiler optimizations to verify
first if the list was simplified, thus use it directly, otherwise,
if it is a list, verify its size.
https://bugzilla.gnome.org/show_bug.cgi?id=776106
This commit is contained in:
parent
0a81f71df5
commit
6ec3cc70b2
1 changed files with 2 additions and 3 deletions
|
@ -2171,9 +2171,8 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object,
|
||||||
gst_value_list_append_and_take_value (&interlace_formats, &interlace_enum);
|
gst_value_list_append_and_take_value (&interlace_formats, &interlace_enum);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_v4l2src_value_simplify (&interlace_formats);
|
if (gst_v4l2src_value_simplify (&interlace_formats)
|
||||||
|
|| gst_value_list_get_size (&interlace_formats) > 0)
|
||||||
if (gst_value_list_get_size (&interlace_formats) > 0)
|
|
||||||
gst_structure_take_value (s, "interlace-mode", &interlace_formats);
|
gst_structure_take_value (s, "interlace-mode", &interlace_formats);
|
||||||
else
|
else
|
||||||
GST_WARNING_OBJECT (v4l2object, "Failed to determine interlace mode");
|
GST_WARNING_OBJECT (v4l2object, "Failed to determine interlace mode");
|
||||||
|
|
Loading…
Reference in a new issue