From: Wim Taymans Date: Mon, 20 Oct 2008 13:32:07 +0000 (+0000) Subject: gst/gstpad.c: When we use gst_pad_alloc_buffer() without wanting to set the caps... X-Git-Tag: GIT_CONVERSION~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b340b510ce3251ae2c789d7e283454f1cf10ae84;p=platform%2Fupstream%2Fgstreamer.git gst/gstpad.c: When we use gst_pad_alloc_buffer() without wanting to set the caps we also don't need to check if the c... Original commit message from CVS: * gst/gstpad.c: (gst_pad_configure_src): When we use gst_pad_alloc_buffer() without wanting to set the caps we also don't need to check if the caps are compatible because the caller presumably is going to perform its own custom checks. Fixes some cases where basetransform elements would error out when it was not needed. --- diff --git a/ChangeLog b/ChangeLog index 34ce342..fa65c71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-10-20 Wim Taymans + * gst/gstpad.c: (gst_pad_configure_src): + When we use gst_pad_alloc_buffer() without wanting to set the caps we + also don't need to check if the caps are compatible because the caller + presumably is going to perform its own custom checks. Fixes some cases + where basetransform elements would error out when it was not needed. + +2008-10-20 Wim Taymans + * libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek): Update comment. diff --git a/gst/gstpad.c b/gst/gstpad.c index a03d7de..57f6b67 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2497,11 +2497,11 @@ gst_pad_configure_src (GstPad * pad, GstCaps * caps, gboolean dosetcaps) { gboolean res; - /* See if pad accepts the caps */ - if (!gst_pad_accept_caps (pad, caps)) - goto not_accepted; - if (dosetcaps) { + /* See if pad accepts the caps */ + if (!gst_pad_accept_caps (pad, caps)) + goto not_accepted; + res = gst_pad_set_caps (pad, caps); } else { res = TRUE;