From fdfc6baf14766e14918fdbc39bc18366e7f89c59 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 28 Oct 2013 12:36:04 +0100 Subject: [PATCH] videoscale: fix adding borders when NV12 is used When the frame buffer is NV12 the borders are not added at all, fix that and fill them to black. https://bugzilla.gnome.org/show_bug.cgi?id=711003 --- gst/videoscale/gstvideoscale.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 0f2eadae46..e7529318e8 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -1378,6 +1378,10 @@ do_scale (GstVideoFilter * filter, VSImage dest[4], VSImage src[4]) } break; case GST_VIDEO_FORMAT_NV12: + if (add_borders) { + vs_fill_borders_Y (&dest[0], black); + vs_fill_borders_Y16 (&dest[1], (black[1] << 8) | black[2]); + } switch (method) { case GST_VIDEO_SCALE_NEAREST: vs_image_scale_nearest_Y (&dest[0], &src[0], videoscale->tmp_buf);