diff --git a/subprojects/gstreamer/gst/gstbin.c b/subprojects/gstreamer/gst/gstbin.c index 571d7cd182..298a8c25ad 100644 --- a/subprojects/gstreamer/gst/gstbin.c +++ b/subprojects/gstreamer/gst/gstbin.c @@ -1390,9 +1390,9 @@ adding_itself: } duplicate_name: { - g_warning ("Name '%s' is not unique in bin '%s', not adding", - elem_name, GST_ELEMENT_NAME (bin)); GST_OBJECT_UNLOCK (bin); + GST_WARNING_OBJECT (bin, "Name '%s' is not unique in bin, not adding", + elem_name); g_free (elem_name); gst_object_ref_sink (element); gst_object_unref (element); @@ -1400,8 +1400,8 @@ duplicate_name: } had_parent: { - g_warning ("Element '%s' already has parent", elem_name); GST_OBJECT_UNLOCK (bin); + GST_WARNING_OBJECT (bin, "Element '%s' already has parent", elem_name); g_free (elem_name); return FALSE; } @@ -1548,8 +1548,7 @@ gst_bin_add (GstBin * bin, GstElement * element) /* ERROR handling */ no_function: { - g_warning ("adding elements to bin '%s' is not supported", - GST_ELEMENT_NAME (bin)); + GST_WARNING_OBJECT (bin, "adding elements to bin is not supported"); gst_object_ref_sink (element); gst_object_unref (element); return FALSE; @@ -1844,10 +1843,9 @@ removing_itself: } not_in_bin: { - g_warning ("Element '%s' is not in bin '%s'", elem_name, - GST_ELEMENT_NAME (bin)); GST_OBJECT_UNLOCK (element); GST_OBJECT_UNLOCK (bin); + GST_WARNING_OBJECT (bin, "Element '%s' is not in bin", elem_name); g_free (elem_name); return FALSE; } @@ -1898,8 +1896,7 @@ gst_bin_remove (GstBin * bin, GstElement * element) /* ERROR handling */ no_function: { - g_warning ("removing elements from bin '%s' is not supported", - GST_ELEMENT_NAME (bin)); + GST_WARNING_OBJECT (bin, "Removing elements from bin is not supported"); return FALSE; } }