[gst-cvs] gstreamer: basetransform: Assume size is the same if no transform_size/ get_unit_size
Wim Taymans
wtay at kemper.freedesktop.org
Mon Jun 14 01:55:44 PDT 2010
Module: gstreamer
Branch: master
Commit: 828f2a338964d948fa2134d8f38f6f14af98be17
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=828f2a338964d948fa2134d8f38f6f14af98be17
Author: Olivier Crête <olivier.crete at collabora.co.uk>
Date: Fri Jun 11 18:46:30 2010 -0400
basetransform: Assume size is the same if no transform_size/get_unit_size
Subclasses that don't implemen transform_size should be assumed to produce output
buffers of the same size.
https://bugzilla.gnome.org/show_bug.cgi?id=621334
---
libs/gst/base/gstbasetransform.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c
index 56e997b..a42c65b 100644
--- a/libs/gst/base/gstbasetransform.c
+++ b/libs/gst/base/gstbasetransform.c
@@ -544,6 +544,11 @@ gst_base_transform_transform_size (GstBaseTransform * trans,
/* if there is a custom transform function, use this */
ret = klass->transform_size (trans, direction, caps, size, othercaps,
othersize);
+ } else if (klass->get_unit_size == NULL) {
+ /* if there is no transform_size and no unit_size, it means the
+ * element does not modify the size of a buffer */
+ *othersize = size;
+ ret = TRUE;
} else {
/* there is no transform_size function, we have to use the unit_size
* functions. This method assumes there is a fixed unit_size associated with
More information about the Gstreamer-commits
mailing list