diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-03-14 18:08:15 +0000 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-03-14 18:14:07 +0000 |
commit | b0b0ae1f24f8651616b2c4709ba9136245122569 (patch) | |
tree | 87d3d1f5e9ed36b75d49672477ee6b0f27268a3a /gst/playback/gststreamsynchronizer.c | |
parent | 33b9535d97284381b3b549ce9a46f1133751716e (diff) |
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
Diffstat (limited to 'gst/playback/gststreamsynchronizer.c')
-rw-r--r-- | gst/playback/gststreamsynchronizer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c index 7902ee102..d0a2d0050 100644 --- a/gst/playback/gststreamsynchronizer.c +++ b/gst/playback/gststreamsynchronizer.c @@ -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 |