From 4fb00958987992945f0eef4183d82932e773dc6c Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Tue, 10 Feb 2015 15:25:04 +0000 Subject: [PATCH] video-converter: bits variable always set In function gst_video_scaler_vertical() the bits variable is always set to either 8 or 16 in every possible format. No need to initialize it. If the format isn't valid it goes to no_func, so there is no need to handle the case of bits not being 8 or 16. CID #1268401 --- gst-libs/gst/video/video-scaler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c index 5d3f685a77..94eb02b346 100644 --- a/gst-libs/gst/video/video-scaler.c +++ b/gst-libs/gst/video/video-scaler.c @@ -1256,7 +1256,7 @@ void gst_video_scaler_vertical (GstVideoScaler * scale, GstVideoFormat format, gpointer src_lines[], gpointer dest, guint dest_offset, guint width) { - gint n_elems, bits = 0; + gint n_elems, bits; GstVideoScalerVFunc func; g_return_if_fail (scale != NULL); @@ -1340,8 +1340,7 @@ gst_video_scaler_vertical (GstVideoScaler * scale, GstVideoFormat format, func = video_scale_v_ntap_u16; break; } - } else - goto no_func; + } if (scale->tmpwidth < width) realloc_tmplines (scale, n_elems, width);