mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
videocrop: Don't always re-run the allocation query
When in-place, running an allocation is not useful since videocrop is not implicated in the allocation. So only force the allocation query for the case it was in passthrough. This is needed since the change in the crop region will likely pull us out of this mode. For the case we where neither in passthrough or in-place, the allocation query is already ran by the baseclass, so nothing special is needed. This fixes performance issues when changing the crop region per frame. This was reproduced using videocrop2-test.
This commit is contained in:
parent
e09b4e9cde
commit
98a5726eba
1 changed files with 5 additions and 3 deletions
|
@ -798,9 +798,11 @@ gst_video_crop_set_info (GstVideoFilter * vfilter, GstCaps * in,
|
||||||
crop->in_info = *in_info;
|
crop->in_info = *in_info;
|
||||||
crop->out_info = *out_info;
|
crop->out_info = *out_info;
|
||||||
|
|
||||||
/* Ensure our decide_allocation will be called again */
|
/* Ensure our decide_allocation will be called again when needed */
|
||||||
|
if (gst_base_transform_is_passthrough (GST_BASE_TRANSFORM (crop))) {
|
||||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (crop), FALSE);
|
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (crop), FALSE);
|
||||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (crop), FALSE);
|
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (crop), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue