mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
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
This commit is contained in:
parent
0de4b76d39
commit
cd9706e9e9
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue