mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
discoverer: Only call handle_current_async if still processing
When gst_element_set_state is called in _setup_locked and errors, the callback is already processed before we reach handle_current_async, and the timer is started even though it's finished processing, which results in a NULL pointer crash later in async_timeout_cb. To fix this, we check that it's still processing before calling handle_current_async. Fixes #1683 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4936>
This commit is contained in:
parent
c5304751ab
commit
fa46905aea
1 changed files with 4 additions and 3 deletions
|
@ -1348,6 +1348,7 @@ setup_next_uri_locked (GstDiscoverer * dc)
|
|||
|
||||
if (!ready) {
|
||||
/* Start timeout */
|
||||
if (dc->priv->processing)
|
||||
handle_current_async (dc);
|
||||
} else {
|
||||
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
|
||||
|
@ -2080,7 +2081,7 @@ start_discovering (GstDiscoverer * dc)
|
|||
g_source_attach (source, dc->priv->ctx);
|
||||
goto beach;
|
||||
}
|
||||
|
||||
if (dc->priv->processing)
|
||||
handle_current_async (dc);
|
||||
} else {
|
||||
if (!ready)
|
||||
|
|
Loading…
Reference in a new issue