basesrc: Return FALSE if we don't handle an event
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 28 Mar 2011 15:51:00 +0000 (21:21 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 28 Mar 2011 16:18:23 +0000 (21:48 +0530)
basesrc's default event handler returns TRUE regardless of whether the
event is handled or not. This fixes the handler to conform with the
expected behaviour (which is to only return TRUE when the event has
actually benn handled). gst_bin_do_latency_func() depended on this
(incorrect) behaviour, and is now modified as well.

(Remaining 1-liner change in gstbasesrc.c is to keep gst-indent happy)

gst/gstbin.c
libs/gst/base/gstbasesrc.c

index 770fb56..7375821 100644 (file)
@@ -2376,11 +2376,8 @@ gst_bin_do_latency_func (GstBin * bin)
           GST_TIME_ARGS (min_latency));
     } else {
       GST_WARNING_OBJECT (element,
-          "failed to configure latency of %" GST_TIME_FORMAT,
+          "did not really configure latency of %" GST_TIME_FORMAT,
           GST_TIME_ARGS (min_latency));
-      GST_ELEMENT_WARNING (element, CORE, CLOCK, (NULL),
-          ("Failed to configure latency of %" GST_TIME_FORMAT,
-              GST_TIME_ARGS (min_latency)));
     }
   } else {
     /* this is not a real problem, we just don't configure any latency. */
index dc97580..fb1679b 100644 (file)
@@ -1737,7 +1737,7 @@ gst_base_src_default_event (GstBaseSrc * src, GstEvent * event)
       break;
     }
     default:
-      result = TRUE;
+      result = FALSE;
       break;
   }
   return result;
@@ -2614,7 +2614,8 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc)
   GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps);
   if (peercaps) {
     /* get intersection */
-    caps = gst_caps_intersect_full (peercaps, thiscaps, GST_CAPS_INTERSECT_FIRST);
+    caps =
+        gst_caps_intersect_full (peercaps, thiscaps, GST_CAPS_INTERSECT_FIRST);
     GST_DEBUG_OBJECT (basesrc, "intersect: %" GST_PTR_FORMAT, caps);
     gst_caps_unref (peercaps);
   } else {