From 201bdf7e27f270b13043306773278ddaaf802ab4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 22 Jun 2006 15:12:50 +0000 Subject: [PATCH] libs/gst/base/gstbasetransform.c: Forgot to remove two unneeded unrefs. Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc): Forgot to remove two unneeded unrefs. Simplify a check _is_equal allready checks the obvious case. --- ChangeLog | 7 +++++++ libs/gst/base/gstbasetransform.c | 10 ++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcbc979eba..32c53e590b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-06-22 Wim Taymans + + * libs/gst/base/gstbasetransform.c: + (gst_base_transform_buffer_alloc): + Forgot to remove two unneeded unrefs. + Simplify a check _is_equal allready checks the obvious case. + 2006-06-22 Wim Taymans * docs/design/part-block.txt: diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index ada3cf2169..ad3c23d5b0 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1049,13 +1049,8 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size, goto not_configured; sinkcaps = GST_PAD_CAPS (trans->sinkpad); - if (sinkcaps != NULL) { - if (sinkcaps != caps || !gst_caps_is_equal (sinkcaps, caps)) { - gst_caps_unref (sinkcaps); - gst_caps_unref (srccaps); - goto not_configured; - } - } + if (sinkcaps != NULL && !gst_caps_is_equal (sinkcaps, caps)) + goto not_configured; GST_DEBUG_OBJECT (trans, "calling transform_size"); if (!gst_base_transform_transform_size (trans, @@ -1082,7 +1077,6 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size, goto not_configured; srccaps = GST_PAD_CAPS (trans->srcpad); - if (!gst_base_transform_transform_size (trans, GST_PAD_DIRECTION (trans->srcpad), srccaps, GST_BUFFER_SIZE (*buf), sinkcaps, &new_size))