From a91d521a3602f33083405467db9454d422b9da1b Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Tue, 13 Jan 2015 15:07:56 +0000 Subject: visual: remove unnecessary variable klass->setup (scope) will always return TRUE since all children of this class do so, no need to store the return. Besides, the value is overwritten a few lines down before it is ever used. Save the unnecessary memory and instructions. CID #1226467 --- ext/libvisual/gstaudiovisualizer.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ext') diff --git a/ext/libvisual/gstaudiovisualizer.c b/ext/libvisual/gstaudiovisualizer.c index 639f1e489..f9eb5be02 100644 --- a/ext/libvisual/gstaudiovisualizer.c +++ b/ext/libvisual/gstaudiovisualizer.c @@ -726,7 +726,6 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) { GstVideoInfo info; GstAudioVisualizerClass *klass; - gboolean res; if (!gst_video_info_from_caps (&info, caps)) goto wrong_caps; @@ -751,7 +750,7 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) GST_MAP_READWRITE); if (klass->setup) - res = klass->setup (scope); + klass->setup (scope); GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d", GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info), @@ -762,9 +761,7 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) gst_pad_set_caps (scope->srcpad, caps); /* find a pool for the negotiated caps now */ - res = gst_audio_visualizer_do_bufferpool (scope, caps); - - return res; + return gst_audio_visualizer_do_bufferpool (scope, caps); /* ERRORS */ wrong_caps: -- cgit v1.2.3