mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 15:32:32 +00:00
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.
This commit is contained in:
parent
871d5c279c
commit
1185aabed9
2 changed files with 10 additions and 1 deletions
|
@ -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>
|
2005-05-06 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* docs/gst/Makefile.am:
|
* docs/gst/Makefile.am:
|
||||||
|
|
|
@ -2349,6 +2349,7 @@ gst_pad_alloc_buffer (GstPad * pad, guint64 offset, gint size, GstCaps * caps)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_caps:
|
||||||
/* FIXME, move capnego this into a base class? */
|
/* FIXME, move capnego this into a base class? */
|
||||||
caps = GST_BUFFER_CAPS (result);
|
caps = GST_BUFFER_CAPS (result);
|
||||||
caps_changed = caps && caps != GST_RPAD_CAPS (pad);
|
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 case, allocate a buffer of our own, add pad caps. */
|
||||||
fallback:
|
fallback:
|
||||||
{
|
{
|
||||||
|
GST_CAT_DEBUG (GST_CAT_PADS,
|
||||||
|
"%s:%s fallback buffer alloc", GST_DEBUG_PAD_NAME (pad));
|
||||||
result = gst_buffer_new_and_alloc (size);
|
result = gst_buffer_new_and_alloc (size);
|
||||||
gst_buffer_set_caps (result, caps);
|
gst_buffer_set_caps (result, caps);
|
||||||
|
|
||||||
return result;
|
goto do_caps;
|
||||||
}
|
}
|
||||||
not_negotiated:
|
not_negotiated:
|
||||||
{
|
{
|
||||||
|
@ -2699,6 +2702,7 @@ gst_pad_push (GstPad * pad, GstBuffer * buffer)
|
||||||
/* FIXME, move capnego this into a base class? */
|
/* FIXME, move capnego this into a base class? */
|
||||||
caps = GST_BUFFER_CAPS (buffer);
|
caps = GST_BUFFER_CAPS (buffer);
|
||||||
caps_changed = caps && caps != GST_RPAD_CAPS (peer);
|
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 */
|
/* we got a new datatype on the peer pad, see if it can handle it */
|
||||||
if (G_UNLIKELY (caps_changed)) {
|
if (G_UNLIKELY (caps_changed)) {
|
||||||
if (G_UNLIKELY (!gst_pad_configure_sink (GST_PAD_CAST (peer), caps)))
|
if (G_UNLIKELY (!gst_pad_configure_sink (GST_PAD_CAST (peer), caps)))
|
||||||
|
|
Loading…
Reference in a new issue