[gst-cvs] gstreamer: basetransform: clarify _caps_is_equal()

Wim Taymans wtay at kemper.freedesktop.org
Thu Aug 6 02:05:29 PDT 2009


Module: gstreamer
Branch: master
Commit: a2a973eafd43e70d25225814e3fb8bae09d5791c
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=a2a973eafd43e70d25225814e3fb8bae09d5791c

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Wed Aug  5 18:02:31 2009 +0200

basetransform: clarify _caps_is_equal()

---

 libs/gst/base/gstbasetransform.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c
index 1c9ecb3..4a54579 100644
--- a/libs/gst/base/gstbasetransform.c
+++ b/libs/gst/base/gstbasetransform.c
@@ -1395,6 +1395,10 @@ gst_base_transform_prepare_output_buffer (GstBaseTransform * trans,
   /* check if we need to make things writable. We need this when we need to
    * update the caps or the metadata on the output buffer. */
   newcaps = GST_BUFFER_CAPS (*out_buf);
+  /* we check the pointers as a quick check and then go to the more involved
+   * check. This is needed when we receive different pointers on the sinkpad
+   * that mean the same caps. What we then want to do is prefer those caps over
+   * the ones on the srcpad and set the srcpad caps to the buffer caps */
   setcaps = (newcaps != outcaps) && (!gst_caps_is_equal (newcaps, outcaps));
   /* we need to modify the metadata when the element is not gap aware,
    * passthrough is not used and the gap flag is set */





More information about the Gstreamer-commits mailing list