mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
appsrc: Release lock before pushing segment event
Do not hold lock during event push. Similar fix to the commit
2e5908d33f
but another place
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5925>
This commit is contained in:
parent
ed4af574d8
commit
56f2c47400
1 changed files with 6 additions and 0 deletions
|
@ -1621,12 +1621,18 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
|
|||
if (!gst_segment_is_equal (&priv->current_segment, segment)) {
|
||||
GST_DEBUG_OBJECT (appsrc,
|
||||
"Update new segment %" GST_PTR_FORMAT, event);
|
||||
|
||||
/* Release lock temporarily during event push */
|
||||
g_mutex_unlock (&priv->mutex);
|
||||
if (!gst_base_src_push_segment (bsrc, segment)) {
|
||||
GST_ERROR_OBJECT (appsrc,
|
||||
"Couldn't set new segment %" GST_PTR_FORMAT, event);
|
||||
gst_event_unref (event);
|
||||
g_mutex_lock (&priv->mutex);
|
||||
goto invalid_segment;
|
||||
}
|
||||
|
||||
g_mutex_lock (&priv->mutex);
|
||||
gst_segment_copy_into (segment, &priv->current_segment);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue