gst/gstpad.c: Also set caps if we use the fallback buffer alloc.
authorWim Taymans <wim.taymans@gmail.com>
Fri, 6 May 2005 19:50:23 +0000 (19:50 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 6 May 2005 19:50:23 +0000 (19:50 +0000)
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_push):
Also set caps if we use the fallback buffer alloc.

ChangeLog
gst/gstpad.c

index 8549ae8..394a597 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-06  Wim Taymans  <wim@fluendo.com>
+
+       * gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_push):
+       Also set caps if we use the fallback buffer alloc.
+
 2005-05-06  Tim-Philipp Müller  <tim at centricular dot net>
 
        * docs/gst/Makefile.am:
index 391ed12..bbc8a58 100644 (file)
@@ -2349,6 +2349,7 @@ gst_pad_alloc_buffer (GstPad * pad, guint64 offset, gint size, GstCaps * caps)
     goto fallback;
   }
 
+do_caps:
   /* FIXME, move capnego this into a base class? */
   caps = GST_BUFFER_CAPS (result);
   caps_changed = caps && caps != GST_RPAD_CAPS (pad);
@@ -2372,10 +2373,12 @@ no_peer:
   /* fallback case, allocate a buffer of our own, add pad caps. */
 fallback:
   {
+    GST_CAT_DEBUG (GST_CAT_PADS,
+        "%s:%s fallback buffer alloc", GST_DEBUG_PAD_NAME (pad));
     result = gst_buffer_new_and_alloc (size);
     gst_buffer_set_caps (result, caps);
 
-    return result;
+    goto do_caps;
   }
 not_negotiated:
   {
@@ -2699,6 +2702,7 @@ gst_pad_push (GstPad * pad, GstBuffer * buffer)
   /* FIXME, move capnego this into a base class? */
   caps = GST_BUFFER_CAPS (buffer);
   caps_changed = caps && caps != GST_RPAD_CAPS (peer);
+  GST_DEBUG ("caps changed %d %" GST_PTR_FORMAT "\n", caps_changed, caps);
   /* we got a new datatype on the peer pad, see if it can handle it */
   if (G_UNLIKELY (caps_changed)) {
     if (G_UNLIKELY (!gst_pad_configure_sink (GST_PAD_CAST (peer), caps)))