mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
video: allow frame copy where destination dimensions are smaller than source
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/695>
This commit is contained in:
parent
02602dd63c
commit
b813c40788
1 changed files with 5 additions and 2 deletions
|
@ -286,6 +286,9 @@ gst_video_frame_unmap (GstVideoFrame * frame)
|
|||
*
|
||||
* Copy the plane with index @plane from @src to @dest.
|
||||
*
|
||||
* Note: Since: 1.18, @dest dimensions are allowed to be
|
||||
* smaller than @src dimensions.
|
||||
*
|
||||
* Returns: TRUE if the contents could be copied.
|
||||
*/
|
||||
gboolean
|
||||
|
@ -309,8 +312,8 @@ gst_video_frame_copy_plane (GstVideoFrame * dest, const GstVideoFrame * src,
|
|||
|
||||
finfo = dinfo->finfo;
|
||||
|
||||
g_return_val_if_fail (dinfo->width == sinfo->width
|
||||
&& dinfo->height == sinfo->height, FALSE);
|
||||
g_return_val_if_fail (dinfo->width <= sinfo->width
|
||||
&& dinfo->height <= sinfo->height, FALSE);
|
||||
g_return_val_if_fail (finfo->n_planes > plane, FALSE);
|
||||
|
||||
sp = src->data[plane];
|
||||
|
|
Loading…
Reference in a new issue