mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-05 22:25:55 +00:00
video-converter: clamp output lines
This commit is contained in:
parent
b2eb5f02fc
commit
308d21c71f
|
@ -1273,8 +1273,11 @@ do_vscale_lines (GstLineCache * cache, gint line, GstVideoConverter * convert)
|
|||
{
|
||||
gpointer *lines, destline;
|
||||
guint sline, n_lines;
|
||||
guint cline;
|
||||
|
||||
gst_video_scaler_get_coeff (convert->v_scaler, line, &sline, &n_lines);
|
||||
cline = CLAMP (line, 0, convert->out_height - 1);
|
||||
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue