mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
pulsesink: don't do logic within g_assert() statements
Otherwise that code will just be expanded to nothing when compiled -DG_DISABLE_ASSERT (PS: why is mainloop_start() called in the init function and not when changing state to READY?)
This commit is contained in:
parent
cee10cb439
commit
a3c393248a
1 changed files with 6 additions and 2 deletions
|
@ -1553,6 +1553,8 @@ server_dead:
|
|||
static void
|
||||
gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass)
|
||||
{
|
||||
guint res;
|
||||
|
||||
pulsesink->server = NULL;
|
||||
pulsesink->device = NULL;
|
||||
pulsesink->device_description = NULL;
|
||||
|
@ -1568,8 +1570,10 @@ gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass)
|
|||
GST_DEBUG_OBJECT (pulsesink, "using pulseaudio version %s",
|
||||
pulsesink->pa_version);
|
||||
|
||||
g_assert ((pulsesink->mainloop = pa_threaded_mainloop_new ()));
|
||||
g_assert (pa_threaded_mainloop_start (pulsesink->mainloop) == 0);
|
||||
pulsesink->mainloop = pa_threaded_mainloop_new ();
|
||||
g_assert (pulsesink->mainloop != NULL);
|
||||
res = pa_threaded_mainloop_start (pulsesink->mainloop);
|
||||
g_assert (res == 0);
|
||||
|
||||
/* TRUE for sinks, FALSE for sources */
|
||||
pulsesink->probe = gst_pulseprobe_new (G_OBJECT (pulsesink),
|
||||
|
|
Loading…
Reference in a new issue