From bae67f116c2d3f6a8f6e68386cc31e6a4e0e85db Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 28 Mar 2011 21:21:00 +0530 Subject: [PATCH] basesrc: Return FALSE if we don't handle an event 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 | 5 +---- libs/gst/base/gstbasesrc.c | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gst/gstbin.c b/gst/gstbin.c index 770fb56f03..73758213e9 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -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. */ diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index dc97580b27..fb1679bdd1 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -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 {