From df9eed0ab55917b0719d784156d8d11f9b8b0136 Mon Sep 17 00:00:00 2001 From: Dimitrios Katsaros Date: Thu, 26 Nov 2015 13:15:06 +0100 Subject: [PATCH] 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 --- sys/v4l2/v4l2_calls.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 356d42f08f..bfb65573cd 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -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; } }