mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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
This commit is contained in:
parent
603c04f4fa
commit
828f2a3389
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue