mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
streamsynchronizer: fix deadlock condition
The variables could have changed when the lock was released to push a gap event. Streamsynchronizer needs to check them again before going to sleep. Bonus: fix a comment typo
This commit is contained in:
parent
33b9535d97
commit
b0b0ae1f24
1 changed files with 5 additions and 1 deletions
|
@ -251,6 +251,10 @@ gst_stream_synchronizer_wait (GstStreamSynchronizer * self, GstPad * pad)
|
|||
return ret;
|
||||
}
|
||||
self->send_gap_event = FALSE;
|
||||
|
||||
/* force a check on the loop conditions as we unlocked a
|
||||
* few lines above and those variables could have changed */
|
||||
continue;
|
||||
}
|
||||
|
||||
g_cond_wait (&stream->stream_finish_cond, &self->lock);
|
||||
|
@ -554,7 +558,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
|
|||
}
|
||||
}
|
||||
|
||||
/* send eos if haven't seen data. seen_data will be ture if data buffer
|
||||
/* send eos if haven't seen data. seen_data will be true if data buffer
|
||||
* of the track have received in anytime. sink is ready if seen_data is
|
||||
* true, so can send GAP event. Will send EOS if sink isn't ready. The
|
||||
* scenario for the case is one track haven't any media data and then
|
||||
|
|
Loading…
Reference in a new issue