mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
splitmuxsrc: Make sure to re-take lock
In the error path when activating a part fails, make sure to re-take the splitmuxsrc lock before returning to the caller. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
This commit is contained in:
parent
44005ab9fb
commit
ec1c6c5b60
1 changed files with 3 additions and 0 deletions
|
@ -1046,6 +1046,7 @@ add_to_active_readers (GstSplitMuxSrc * splitmux,
|
|||
}
|
||||
}
|
||||
|
||||
/* Called with splitmuxsrc lock held */
|
||||
static gboolean
|
||||
gst_splitmux_src_activate_part (GstSplitMuxSrc * splitmux, guint part,
|
||||
GstSeekFlags extra_flags)
|
||||
|
@ -1062,6 +1063,8 @@ gst_splitmux_src_activate_part (GstSplitMuxSrc * splitmux, guint part,
|
|||
if (!gst_splitmux_part_reader_activate (reader,
|
||||
&splitmux->play_segment, extra_flags)) {
|
||||
gst_object_unref (reader);
|
||||
/* Re-take the lock before exiting */
|
||||
SPLITMUX_SRC_LOCK (splitmux);
|
||||
return FALSE;
|
||||
}
|
||||
gst_object_unref (reader);
|
||||
|
|
Loading…
Reference in a new issue