mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
video-frame: only copy the visible region
Make sure to only copy the visible region instead of assuming that the complete stride is visible (which is not the case when padding is used).
This commit is contained in:
parent
6702a2f64c
commit
211b8b6004
1 changed files with 4 additions and 1 deletions
|
@ -230,7 +230,10 @@ gst_video_frame_copy_plane (GstVideoFrame * dest, const GstVideoFrame * src,
|
||||||
ss = sinfo->stride[plane];
|
ss = sinfo->stride[plane];
|
||||||
ds = dinfo->stride[plane];
|
ds = dinfo->stride[plane];
|
||||||
|
|
||||||
w = MIN (ABS (ss), ABS (ds));
|
/* FIXME. assumes subsampling of component N is the same as plane N, which is
|
||||||
|
* currently true for all formats we have but it might not be in the future. */
|
||||||
|
w = GST_VIDEO_FRAME_COMP_WIDTH (dest,
|
||||||
|
plane) * GST_VIDEO_FRAME_COMP_PSTRIDE (dest, plane);
|
||||||
h = GST_VIDEO_FRAME_COMP_HEIGHT (dest, plane);
|
h = GST_VIDEO_FRAME_COMP_HEIGHT (dest, plane);
|
||||||
|
|
||||||
GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy plane %d, w:%d h:%d ", plane, w, h);
|
GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy plane %d, w:%d h:%d ", plane, w, h);
|
||||||
|
|
Loading…
Reference in a new issue