From d8308d5a8ff08422434a97dd17a9775e4931ef04 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Wed, 4 Feb 2015 11:25:54 +0000 Subject: [PATCH] video-resampler: make sure params.envelope is initialized In gst_video_resampler_init () if method is GST_VIDEO_RESAMPLER_METHOD_NEAREST then params.envelope is not initialized but still used later in line 382. Make sure this variable is initiliazed to avoid undefined behaviour. CID #1256568 --- gst-libs/gst/video/video-resampler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst-libs/gst/video/video-resampler.c b/gst-libs/gst/video/video-resampler.c index bd52640570..ccad73c0e8 100644 --- a/gst-libs/gst/video/video-resampler.c +++ b/gst-libs/gst/video/video-resampler.c @@ -348,6 +348,7 @@ gst_video_resampler_init (GstVideoResampler * resampler, switch (method) { case GST_VIDEO_RESAMPLER_METHOD_NEAREST: + params.envelope = GET_OPT_ENVELOPE (options); params.get_tap = get_nearest_tap; if (n_taps == 0) n_taps = 1;