From: Sebastian Dröge Date: Mon, 22 Jun 2015 18:54:18 +0000 (+0200) Subject: streamsynchronizer: Don't wait for sparse streams when doing stream switches X-Git-Tag: 1.19.3~511^2~3504 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd508a343f1ee729a71fecce9df18b4321aea2ee;p=platform%2Fupstream%2Fgstreamer.git streamsynchronizer: Don't wait for sparse streams when doing stream switches Their stream-start event might come a bit later, like just before the first buffer... and queues might run full before that happens. --- diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c index 5d72d56..d417670 100644 --- a/gst/playback/gststreamsynchronizer.c +++ b/gst/playback/gststreamsynchronizer.c @@ -71,6 +71,8 @@ typedef struct gboolean seen_data; GstClockTime gap_duration; + GstStreamFlags flags; + GCond stream_finish_cond; /* seqnum of the previously received STREAM_START @@ -298,6 +300,8 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, break; } + gst_event_parse_stream_flags (event, &stream->flags); + if ((have_group_id && stream->group_id != group_id) || (!have_group_id && stream->stream_start_seqnum != seqnum)) { stream->is_eos = FALSE; @@ -342,8 +346,9 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, for (l = self->streams; l; l = l->next) { GstStream *ostream = l->data; - all_wait = all_wait && ostream->wait && (!have_group_id - || ostream->group_id == group_id); + all_wait = all_wait && ((ostream->flags & GST_STREAM_FLAG_SPARSE) + || (ostream->wait && (!have_group_id + || ostream->group_id == group_id))); if (!all_wait) break; }