mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
7cc048f4df
commit
a91d521a36
1 changed files with 2 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue