v4l2: Change warning handling to break infinite message loop

v4l2src can cause an "infinite message loop" when a base control exposed as a
property is not provided by the device. In these cases, if in the warning message
handling for the bus, the GST_DEBUG_BIN_TO_DOT_FILE* category of functions are used,
the src lookup causes a new warning to be posted on the bus, causing a loop.

This patch changes the warning for these controls so they are not posted on the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=758703
This commit is contained in:
Dimitrios Katsaros 2015-11-26 13:15:06 +01:00 committed by Nicolas Dufresne
parent 7886e8d8a0
commit df9eed0ab5

View file

@ -923,9 +923,9 @@ gst_v4l2_get_attribute (GstV4l2Object * v4l2object,
/* ERRORS */
ctrl_failed:
{
GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, SETTINGS,
(_("Failed to get value for control %d on device '%s'."),
attribute_num, v4l2object->videodev), GST_ERROR_SYSTEM);
GST_WARNING_OBJECT (v4l2object,
_("Failed to get value for control %d on device '%s'."),
attribute_num, v4l2object->videodev);
return FALSE;
}
}
@ -958,9 +958,9 @@ gst_v4l2_set_attribute (GstV4l2Object * v4l2object,
/* ERRORS */
ctrl_failed:
{
GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, SETTINGS,
(_("Failed to set value %d for control %d on device '%s'."),
value, attribute_num, v4l2object->videodev), GST_ERROR_SYSTEM);
GST_WARNING_OBJECT (v4l2object,
_("Failed to set value %d for control %d on device '%s'."),
value, attribute_num, v4l2object->videodev);
return FALSE;
}
}