mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
videocrop: Also update the coordinate when in-place
This update is needed when the output caps is not changed (e.g. we are moving a viewport around). Fixes #669
This commit is contained in:
parent
98a5726eba
commit
e66a4b64b3
1 changed files with 8 additions and 0 deletions
|
@ -508,11 +508,19 @@ static GstFlowReturn
|
|||
gst_video_crop_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
||||
{
|
||||
GstVideoCrop *vcrop = GST_VIDEO_CROP (trans);
|
||||
GstVideoFilter *vfilter = GST_VIDEO_FILTER (trans);
|
||||
GstVideoMeta *video_meta;
|
||||
GstVideoCropMeta *crop_meta;
|
||||
|
||||
GST_LOG_OBJECT (trans, "Transforming in-place");
|
||||
|
||||
if (G_UNLIKELY (vcrop->need_update)) {
|
||||
if (!gst_video_crop_set_info (vfilter, NULL, &vcrop->in_info, NULL,
|
||||
&vcrop->out_info)) {
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* The video meta is required since we are going to make the caps
|
||||
* width/height smaller, which would not result in a usable GstVideoInfo for
|
||||
* mapping the buffer. */
|
||||
|
|
Loading…
Reference in a new issue