mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 15:32:32 +00:00
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.
This commit is contained in:
parent
d3a73827e0
commit
1bb169410e
1 changed files with 8 additions and 2 deletions
|
@ -750,8 +750,8 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps)
|
||||||
gst_video_frame_map (&scope->tempframe, &scope->vinfo, scope->tempbuf,
|
gst_video_frame_map (&scope->tempframe, &scope->vinfo, scope->tempbuf,
|
||||||
GST_MAP_READWRITE);
|
GST_MAP_READWRITE);
|
||||||
|
|
||||||
if (klass->setup)
|
if (klass->setup && !klass->setup)
|
||||||
res = klass->setup (scope);
|
goto setup_failed;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d",
|
GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d",
|
||||||
GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info),
|
GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info),
|
||||||
|
@ -772,6 +772,12 @@ wrong_caps:
|
||||||
GST_DEBUG_OBJECT (scope, "error parsing caps");
|
GST_DEBUG_OBJECT (scope, "error parsing caps");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_failed:
|
||||||
|
{
|
||||||
|
GST_WARNING_OBJECT (scope, "failed to set up");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue