mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 21:46:22 +00:00
basetransform: fix negotiation regression
Fixup patch for 83597767b1
Use a separate variable for knowing if a pad alloc has been made
instead of checking for the flow return that might not be the
result of the pad alloc
https://bugzilla.gnome.org/show_bug.cgi?id=648220
This commit is contained in:
parent
e029aeef9e
commit
0253c85b0d
1 changed files with 3 additions and 1 deletions
|
@ -1715,6 +1715,7 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
|
||||||
GstBaseTransformClass *klass;
|
GstBaseTransformClass *klass;
|
||||||
GstBaseTransformPrivate *priv;
|
GstBaseTransformPrivate *priv;
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
gboolean alloced = FALSE;
|
||||||
gboolean proxy, suggest, same_caps;
|
gboolean proxy, suggest, same_caps;
|
||||||
GstCaps *sink_suggest = NULL;
|
GstCaps *sink_suggest = NULL;
|
||||||
guint size_suggest;
|
guint size_suggest;
|
||||||
|
@ -1921,6 +1922,7 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
|
||||||
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
|
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
goto alloc_failed;
|
goto alloc_failed;
|
||||||
|
alloced = TRUE;
|
||||||
|
|
||||||
/* check if the caps changed */
|
/* check if the caps changed */
|
||||||
newcaps = GST_BUFFER_CAPS (*buf);
|
newcaps = GST_BUFFER_CAPS (*buf);
|
||||||
|
@ -1966,7 +1968,7 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
|
||||||
if (sink_suggest)
|
if (sink_suggest)
|
||||||
gst_caps_unref (sink_suggest);
|
gst_caps_unref (sink_suggest);
|
||||||
|
|
||||||
if (res == GST_FLOW_OK) {
|
if (res == GST_FLOW_OK && alloced) {
|
||||||
/* just alloc'ed a buffer, so we only want to do this again if we
|
/* just alloc'ed a buffer, so we only want to do this again if we
|
||||||
* received a buffer */
|
* received a buffer */
|
||||||
GST_DEBUG_OBJECT (trans, "Cleaning force alloc");
|
GST_DEBUG_OBJECT (trans, "Cleaning force alloc");
|
||||||
|
|
Loading…
Reference in a new issue