From cd9706e9e94185d94d524b86552fe8613eb754fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 28 Oct 2012 00:07:46 +0100 Subject: [PATCH] pulsesrc: don't assert in get_time() when called after shutdown Which might happen if the source gets set to NULL state before the rest of the pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=686985 --- ext/pulse/pulsesrc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c index 6003d13..12f847d 100644 --- a/ext/pulse/pulsesrc.c +++ b/ext/pulse/pulsesrc.c @@ -1754,6 +1754,9 @@ gst_pulsesrc_get_time (GstClock * clock, GstPulseSrc * src) { pa_usec_t time = 0; + if (src->mainloop == NULL) + goto out; + pa_threaded_mainloop_lock (src->mainloop); if (!src->stream) goto unlock_and_out; @@ -1772,5 +1775,6 @@ gst_pulsesrc_get_time (GstClock * clock, GstPulseSrc * src) unlock_and_out: pa_threaded_mainloop_unlock (src->mainloop); +out: return time; } -- 2.7.4