[0.11] gstreamer: basesrc: Return FALSE if we don't handle an event
Edward Hervey
bilboed at kemper.freedesktop.org
Wed Mar 30 12:33:40 PDT 2011
Module: gstreamer
Branch: 0.11
Commit: bae67f116c2d3f6a8f6e68386cc31e6a4e0e85db
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=bae67f116c2d3f6a8f6e68386cc31e6a4e0e85db
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Mon Mar 28 21:39:00 2011 +0530
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 770fb56..7375821 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 dc97580..fb1679b 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 {
More information about the gstreamer-commits
mailing list