element: make 'adding flushing pad' warning more useful
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 29 Apr 2010 22:26:54 +0000 (23:26 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 30 Apr 2010 12:09:34 +0000 (13:09 +0100)
This is a pretty common issue with ghost pads, let's make
the warning more helpful and tell people what they need
to do to fix it.

gst/gstelement.c

index a340d6c..99c5d19 100644 (file)
@@ -712,7 +712,8 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
   /* check for flushing pads */
   if (flushing && (GST_STATE (element) > GST_STATE_READY ||
           GST_STATE_NEXT (element) == GST_STATE_PAUSED)) {
-    g_warning ("adding flushing pad '%s' to running element '%s'",
+    g_warning ("adding flushing pad '%s' to running element '%s', you need to "
+        "use gst_pad_set_active(pad,TRUE) before adding it.",
         GST_STR_NULL (pad_name), GST_ELEMENT_NAME (element));
     /* unset flushing */
     GST_OBJECT_LOCK (pad);