streamsynchronizer: Unblock EOS wait when track switching.

sink_event () will blocked on EOS event. which will cause can't
send event when switch EOS track to non-EOS one.

https://bugzilla.gnome.org/show_bug.cgi?id=750761
This commit is contained in:
Song Bing 2015-06-17 18:03:09 +08:00 committed by Sebastian Dröge
parent bd508a343f
commit d2e942ac02

View file

@ -512,6 +512,25 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
self->group_start_time = new_group_start_time;
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
break;
}
/* unblocking EOS wait when track switch. */
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:{
if (gst_event_has_name (event, "playsink-custom-video-flush")
|| gst_event_has_name (event, "playsink-custom-audio-flush")
|| gst_event_has_name (event, "playsink-custom-subtitle-flush")) {
GstStream *stream;
GST_STREAM_SYNCHRONIZER_LOCK (self);
stream = gst_pad_get_element_private (pad);
if (stream) {
stream->is_eos = FALSE;
stream->eos_sent = FALSE;
stream->wait = FALSE;
g_cond_broadcast (&stream->stream_finish_cond);
}
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
}
break;
}
case GST_EVENT_EOS:{
GstStream *stream;