mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/base/gstbasetransform.c: Treat a pad alloc with new caps the same as if we were not negotiated, in order to allow...
Original commit message from CVS: * gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc): Treat a pad alloc with new caps the same as if we were not negotiated, in order to allow a changing upstream output to produce a new format of data.
This commit is contained in:
parent
33a15d5e67
commit
aff648ab66
3 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-11-29 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc):
|
||||||
|
Treat a pad alloc with new caps the same as if we were not
|
||||||
|
negotiated, in order to allow a changing upstream output
|
||||||
|
to produce a new format of data.
|
||||||
|
|
||||||
2005-11-29 Edward Hervey <edward@fluendo.com>
|
2005-11-29 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
|
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
|
||||||
|
@ -22,6 +29,7 @@
|
||||||
* gst/gstghostpad.c: (gst_proxy_pad_get_target):
|
* gst/gstghostpad.c: (gst_proxy_pad_get_target):
|
||||||
Don't ref NULL target pad (#322751). Improve docs.
|
Don't ref NULL target pad (#322751). Improve docs.
|
||||||
|
|
||||||
|
>>>>>>> 1.2041
|
||||||
2005-11-29 Michael Smith <msmith@fluendo.com>
|
2005-11-29 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* gst/gstregistryxml.c: (load_plugin):
|
* gst/gstregistryxml.c: (load_plugin):
|
||||||
|
|
|
@ -960,10 +960,20 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
|
||||||
} else {
|
} else {
|
||||||
/* if we are configured, request a buffer with the src caps */
|
/* if we are configured, request a buffer with the src caps */
|
||||||
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
|
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
|
||||||
|
GstCaps *sinkcaps = gst_pad_get_negotiated_caps (trans->sinkpad);
|
||||||
|
|
||||||
if (!srccaps)
|
if (!srccaps)
|
||||||
goto not_configured;
|
goto not_configured;
|
||||||
|
|
||||||
|
if (sinkcaps != NULL) {
|
||||||
|
if (sinkcaps != caps || !gst_caps_is_equal (sinkcaps, caps)) {
|
||||||
|
gst_caps_unref (sinkcaps);
|
||||||
|
gst_caps_unref (srccaps);
|
||||||
|
goto not_configured;
|
||||||
|
}
|
||||||
|
gst_caps_unref (sinkcaps);
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans, "calling transform_size");
|
GST_DEBUG_OBJECT (trans, "calling transform_size");
|
||||||
if (!gst_base_transform_transform_size (trans,
|
if (!gst_base_transform_transform_size (trans,
|
||||||
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {
|
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {
|
||||||
|
|
|
@ -960,10 +960,20 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
|
||||||
} else {
|
} else {
|
||||||
/* if we are configured, request a buffer with the src caps */
|
/* if we are configured, request a buffer with the src caps */
|
||||||
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
|
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
|
||||||
|
GstCaps *sinkcaps = gst_pad_get_negotiated_caps (trans->sinkpad);
|
||||||
|
|
||||||
if (!srccaps)
|
if (!srccaps)
|
||||||
goto not_configured;
|
goto not_configured;
|
||||||
|
|
||||||
|
if (sinkcaps != NULL) {
|
||||||
|
if (sinkcaps != caps || !gst_caps_is_equal (sinkcaps, caps)) {
|
||||||
|
gst_caps_unref (sinkcaps);
|
||||||
|
gst_caps_unref (srccaps);
|
||||||
|
goto not_configured;
|
||||||
|
}
|
||||||
|
gst_caps_unref (sinkcaps);
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans, "calling transform_size");
|
GST_DEBUG_OBJECT (trans, "calling transform_size");
|
||||||
if (!gst_base_transform_transform_size (trans,
|
if (!gst_base_transform_transform_size (trans,
|
||||||
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {
|
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {
|
||||||
|
|
Loading…
Reference in a new issue