From cb49718e8685f9941f383fc4ee2684d7bc270ce3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 9 Aug 2006 11:01:20 +0000 Subject: [PATCH] libs/gst/base/gstbasetransform.c: Even if we can't figure out the proper format to request downstream, call buffer_al... Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc): Even if we can't figure out the proper format to request downstream, call buffer_alloc() downstream with the input parameters without setting the caps on the srcpad. This will force negotiation in the chain function. Closes #350449 --- ChangeLog | 10 ++++++++++ libs/gst/base/gstbasetransform.c | 12 ++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1828b98c3d..888f2f4ade 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-08-09 Edward Hervey + + * libs/gst/base/gstbasetransform.c: + (gst_base_transform_buffer_alloc): + Even if we can't figure out the proper format to request downstream, + call buffer_alloc() downstream with the input parameters without setting + the caps on the srcpad. This will force negotiation in the chain + function. + Closes #350449 + 2006-08-08 Edward Hervey * gst/gstghostpad.c: (gst_ghost_pad_do_unlink): diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index d8bfd2d4f4..cc2aabd1bf 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1149,18 +1149,22 @@ done: not_configured: { - /* let the default allocator handle it */ + /* let the default allocator handle it... */ GST_DEBUG_OBJECT (trans, "not configured"); gst_buffer_replace (buf, NULL); - res = GST_FLOW_OK; + /* ...by calling alloc_buffer without setting caps on the src pad, which + * will force negotiation in the chain function. */ + res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf); goto done; } unknown_size: { - /* let the default allocator handle it */ + /* let the default allocator handle it... */ GST_DEBUG_OBJECT (trans, "unknown size"); gst_buffer_replace (buf, NULL); - res = GST_FLOW_OK; + /* ...by calling alloc_buffer without setting caps on the src pad, which + * will force negotiation in the chain function. */ + res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf); goto done; } }