gst/gstinfo.c: Add some newlines.
authorTim-Philipp Müller <tim@centricular.net>
Thu, 6 Apr 2006 11:27:24 +0000 (11:27 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 6 Apr 2006 11:27:24 +0000 (11:27 +0000)
Original commit message from CVS:
* gst/gstinfo.c: (__gst_in_valgrind):
Add some newlines.
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
Don't leak buffer caps.

ChangeLog
gst/gstinfo.c
plugins/elements/gsttypefindelement.c

index 73008de..8ce0bb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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:
index 087013e..01b7c82 100644 (file)
@@ -244,9 +244,9 @@ __gst_in_valgrind (void)
 #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");
index 9d37c0b..17e7cdb 100644 (file)
@@ -536,26 +536,22 @@ gst_type_find_element_chain (GstPad * pad, GstBuffer * buffer)
 
   /* 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;
       }
     }
   }