mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
video-scaler: Correctly handle interlaced vertical scalers in gst_video_scaler_2d()
We need to provide twice as many lines as usual to the scaling function as every second lines would be skipped. Without this we read from random memory and produce colorful output and crashes.
This commit is contained in:
parent
255beae3ec
commit
c9f132986c
1 changed files with 3 additions and 0 deletions
|
@ -1491,6 +1491,9 @@ gst_video_scaler_2d (GstVideoScaler * hscale, GstVideoScaler * vscale,
|
||||||
realloc_tmplines (vscale, n_elems, width);
|
realloc_tmplines (vscale, n_elems, width);
|
||||||
|
|
||||||
v_taps = vscale->resampler.max_taps;
|
v_taps = vscale->resampler.max_taps;
|
||||||
|
if (vscale->flags & GST_VIDEO_SCALER_FLAG_INTERLACED)
|
||||||
|
v_taps *= 2;
|
||||||
|
|
||||||
lines = g_alloca (v_taps * sizeof (gpointer));
|
lines = g_alloca (v_taps * sizeof (gpointer));
|
||||||
|
|
||||||
if (hscale == NULL) {
|
if (hscale == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue