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
This commit is contained in:
Luis de Bethencourt 2015-01-13 15:07:56 +00:00
parent 7cc048f4df
commit a91d521a36

View file

@ -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: