mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
splitmux: Fix a small race in the splitmuxsrc
Make sure the state of the parser is set to collecting streams before chaining up to the parent change_state() method, to close a small window that can cause playback to never commence.
This commit is contained in:
parent
3a4d4dcd27
commit
6a16f8ef2e
1 changed files with 3 additions and 3 deletions
|
@ -1042,6 +1042,9 @@ gst_splitmux_part_reader_change_state (GstElement * element,
|
|||
* changing the states of things, and type finding can continue */
|
||||
SPLITMUX_PART_LOCK (reader);
|
||||
g_object_set (reader->src, "location", reader->path, NULL);
|
||||
reader->prep_state = PART_STATE_PREPARING_COLLECT_STREAMS;
|
||||
gst_splitmux_part_reader_set_flushing_locked (reader, FALSE);
|
||||
reader->running = TRUE;
|
||||
SPLITMUX_PART_UNLOCK (reader);
|
||||
SPLITMUX_PART_TYPE_LOCK (reader);
|
||||
break;
|
||||
|
@ -1082,9 +1085,6 @@ gst_splitmux_part_reader_change_state (GstElement * element,
|
|||
SPLITMUX_PART_TYPE_UNLOCK (reader);
|
||||
|
||||
SPLITMUX_PART_LOCK (reader);
|
||||
reader->prep_state = PART_STATE_PREPARING_COLLECT_STREAMS;
|
||||
gst_splitmux_part_reader_set_flushing_locked (reader, FALSE);
|
||||
reader->running = TRUE;
|
||||
|
||||
while (reader->prep_state == PART_STATE_PREPARING_COLLECT_STREAMS) {
|
||||
GST_LOG_OBJECT (reader, "Waiting to collect all output streams");
|
||||
|
|
Loading…
Reference in a new issue