kate: flush on seek, and ensure we cancel any waiting buffer

This is what pango textoverlay does, and I've had that condition
variable get stuck once.

https://bugzilla.gnome.org/show_bug.cgi?id=658940
This commit is contained in:
Vincent Penquerc'h 2011-09-13 16:24:32 +01:00 committed by Sebastian Dröge
parent ac5121eb01
commit c8bda2ed76

View file

@ -858,9 +858,13 @@ gst_kate_tiger_seek (GstKateTiger * tiger, GstPad * pad, GstEvent * event)
gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur,
&stop_type, &stop);
if (flags & GST_SEEK_FLAG_FLUSH)
gst_pad_push_event (tiger->srcpad, gst_event_new_flush_start ());
GST_KATE_TIGER_MUTEX_LOCK (tiger);
tiger->video_flushing = TRUE;
gst_kate_util_decoder_base_set_flushing (&tiger->decoder, TRUE);
g_cond_broadcast (tiger->cond);
GST_KATE_TIGER_MUTEX_UNLOCK (tiger);
if (format == GST_FORMAT_TIME) {