From: Wim Taymans Date: Fri, 6 May 2005 19:50:23 +0000 (+0000) Subject: gst/gstpad.c: Also set caps if we use the fallback buffer alloc. X-Git-Tag: RELEASE-0_9_2~512 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1185aabed9d893b8eaa6b566ee1d50ce8fa6bebb;p=platform%2Fupstream%2Fgstreamer.git gst/gstpad.c: Also set caps if we use the fallback buffer alloc. 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. --- diff --git a/ChangeLog b/ChangeLog index 8549ae8..394a597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-06 Wim Taymans + + * 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 * docs/gst/Makefile.am: diff --git a/gst/gstpad.c b/gst/gstpad.c index 391ed12..bbc8a58 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -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)))