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:
Jan Schmidt 2005-11-29 15:12:22 +00:00
parent 33a15d5e67
commit aff648ab66
3 changed files with 28 additions and 0 deletions

View file

@ -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>
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
@ -22,6 +29,7 @@
* gst/gstghostpad.c: (gst_proxy_pad_get_target):
Don't ref NULL target pad (#322751). Improve docs.
>>>>>>> 1.2041
2005-11-29 Michael Smith <msmith@fluendo.com>
* gst/gstregistryxml.c: (load_plugin):

View file

@ -960,10 +960,20 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
} else {
/* if we are configured, request a buffer with the src caps */
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
GstCaps *sinkcaps = gst_pad_get_negotiated_caps (trans->sinkpad);
if (!srccaps)
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");
if (!gst_base_transform_transform_size (trans,
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {

View file

@ -960,10 +960,20 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
} else {
/* if we are configured, request a buffer with the src caps */
GstCaps *srccaps = gst_pad_get_negotiated_caps (trans->srcpad);
GstCaps *sinkcaps = gst_pad_get_negotiated_caps (trans->sinkpad);
if (!srccaps)
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");
if (!gst_base_transform_transform_size (trans,
GST_PAD_DIRECTION (pad), caps, size, srccaps, &new_size)) {