+2006-04-06 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/gstinfo.c: (__gst_in_valgrind):
+ Add some newlines.
+
+ * plugins/elements/gsttypefindelement.c:
+ (gst_type_find_element_chain):
+ Don't leak buffer caps.
+
2006-04-06 Michael Smith <msmith@fluendo.com>
* gst/parse/grammar.y:
#ifdef HAVE_VALGRIND
if (RUNNING_ON_VALGRIND) {
GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
- printf ("GStreamer has detected that it is running inside valgrind.");
- printf ("It might now take different code paths to ease debugging.");
- printf ("Of course, this may also lead to different bugs.");
+ printf ("GStreamer has detected that it is running inside valgrind.\n");
+ printf ("It might now take different code paths to ease debugging.\n");
+ printf ("Of course, this may also lead to different bugs.\n");
in_valgrind = GST_VG_INSIDE;
} else {
GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
/* Shortcircuit typefinding if we already have non-any caps */
if (typefind->mode == MODE_TYPEFIND) {
- GstCaps *caps = gst_buffer_get_caps (buffer);
+ const GstCaps *caps = GST_BUFFER_CAPS (buffer);
- if (caps) {
- if (gst_caps_is_any (caps)) {
- gst_caps_unref (caps);
- } else {
- GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
- "upstream buffer: %" GST_PTR_FORMAT, caps);
- typefind->mode = MODE_NORMAL;
- g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
- GST_TYPE_FIND_MAXIMUM, caps);
-
- gst_type_find_element_send_cached_events (typefind);
- if (typefind->store) {
- GST_DEBUG_OBJECT (typefind, "Pushing store: %d",
- GST_BUFFER_SIZE (typefind->store));
- gst_buffer_set_caps (typefind->store, typefind->caps);
- gst_pad_push (typefind->src, typefind->store);
- typefind->store = NULL;
- }
+ if (caps && !gst_caps_is_any (caps)) {
+ GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
+ "upstream buffer: %" GST_PTR_FORMAT, caps);
+ typefind->mode = MODE_NORMAL;
+ g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
+ GST_TYPE_FIND_MAXIMUM, caps);
+
+ gst_type_find_element_send_cached_events (typefind);
+ if (typefind->store) {
+ GST_DEBUG_OBJECT (typefind, "Pushing store: %d",
+ GST_BUFFER_SIZE (typefind->store));
+ gst_buffer_set_caps (typefind->store, typefind->caps);
+ gst_pad_push (typefind->src, typefind->store);
+ typefind->store = NULL;
}
}
}