diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2019-10-21 17:28:46 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-10-24 18:07:55 +0100 |
commit | a6d24b3c5ff59445679350cdb7ce56f9a9e15787 (patch) | |
tree | 74e2a0b21c3611b9cc2f729d2435faf54c616f4d | |
parent | b2a5c9f856ce07eb40d43a2cc1c6a250d204c3d5 (diff) | |
download | gstreamer-plugins-base-a6d24b3c5ff59445679350cdb7ce56f9a9e15787.tar.gz |
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.
-rw-r--r-- | gst-libs/gst/video/video-scaler.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c index 49f697b91..ce30a0eeb 100644 --- a/gst-libs/gst/video/video-scaler.c +++ b/gst-libs/gst/video/video-scaler.c @@ -1492,6 +1492,9 @@ gst_video_scaler_2d (GstVideoScaler * hscale, GstVideoScaler * vscale, realloc_tmplines (vscale, n_elems, width); v_taps = vscale->resampler.max_taps; + if (vscale->flags & GST_VIDEO_SCALER_FLAG_INTERLACED) + v_taps *= 2; + lines = g_alloca (v_taps * sizeof (gpointer)); if (hscale == NULL) { |