mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
video: allow frame copy destination to have dimensions smaller than source
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/707>
This commit is contained in:
parent
e6823576ce
commit
c770f0b68e
1 changed files with 5 additions and 2 deletions
|
@ -398,6 +398,9 @@ gst_video_frame_copy_plane (GstVideoFrame * dest, const GstVideoFrame * src,
|
|||
*
|
||||
* Copy the contents 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
|
||||
|
@ -414,8 +417,8 @@ gst_video_frame_copy (GstVideoFrame * dest, const GstVideoFrame * src)
|
|||
dinfo = &dest->info;
|
||||
|
||||
g_return_val_if_fail (dinfo->finfo->format == sinfo->finfo->format, FALSE);
|
||||
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);
|
||||
|
||||
n_planes = dinfo->finfo->n_planes;
|
||||
|
||||
|
|
Loading…
Reference in a new issue