summaryrefslogtreecommitdiff
path: root/ext/libvisual
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-01-13 16:36:09 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-01-13 16:36:09 +0000
commit1bb169410e36d0c84f4553db35cc2bde9a346bee (patch)
tree4a12b2bca92058e09ae5be1ec6a24e0672c156a5 /ext/libvisual
parentd3a73827e017b3b5967664b2cb83fe0de185f700 (diff)
downloadgstreamer-plugins-base-1bb169410e36d0c84f4553db35cc2bde9a346bee.tar.gz
visual: handle the return of the setup function
Make the baseclass future proof by handling the gboolean return of the setup function. So if/when a child class uses this the base class is ready.
Diffstat (limited to 'ext/libvisual')
-rw-r--r--ext/libvisual/gstaudiovisualizer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/libvisual/gstaudiovisualizer.c b/ext/libvisual/gstaudiovisualizer.c
index 639f1e489..3aac927c8 100644
--- a/ext/libvisual/gstaudiovisualizer.c
+++ b/ext/libvisual/gstaudiovisualizer.c
@@ -750,8 +750,8 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps)
gst_video_frame_map (&scope->tempframe, &scope->vinfo, scope->tempbuf,
GST_MAP_READWRITE);
- if (klass->setup)
- res = klass->setup (scope);
+ if (klass->setup && !klass->setup)
+ goto setup_failed;
GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d",
GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info),
@@ -772,6 +772,12 @@ wrong_caps:
GST_DEBUG_OBJECT (scope, "error parsing caps");
return FALSE;
}
+
+setup_failed:
+ {
+ GST_WARNING_OBJECT (scope, "failed to set up");
+ return FALSE;
+ }
}
static gboolean