From: Wim Taymans Date: Fri, 31 Oct 2014 09:38:15 +0000 (+0100) Subject: video-converter: clamp output lines X-Git-Tag: 1.6.0~889 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=308d21c71f12f9546b3197e03a4288509287d76c;p=platform%2Fupstream%2Fgst-plugins-base.git video-converter: clamp output lines --- diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index edcf67c..9099cab 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -1273,8 +1273,11 @@ do_vscale_lines (GstLineCache * cache, gint line, GstVideoConverter * convert) { gpointer *lines, destline; guint sline, n_lines; + guint cline; + + cline = CLAMP (line, 0, convert->out_height - 1); - gst_video_scaler_get_coeff (convert->v_scaler, line, &sline, &n_lines); + gst_video_scaler_get_coeff (convert->v_scaler, cline, &sline, &n_lines); lines = gst_line_cache_get_lines (convert->vscale_lines, sline, n_lines); destline = get_temp_line (convert, convert->out_x); @@ -1283,7 +1286,7 @@ do_vscale_lines (GstLineCache * cache, gint line, GstVideoConverter * convert) * to be careful to not do in-place modifications later */ GST_DEBUG ("vresample line %d %d-%d", line, sline, sline + n_lines - 1); gst_video_scaler_vertical (convert->v_scaler, GST_VIDEO_FORMAT_AYUV, - lines, destline, line, convert->v_scale_width); + lines, destline, cline, convert->v_scale_width); gst_line_cache_add_line (cache, line, destline);