rndbuffersize: must send flush-stop after acquiring the stream lock

Otherwise the streaming thread might just keep on going and we
might never get the stream lock.
This commit is contained in:
Tim-Philipp Müller 2012-05-09 12:24:37 +01:00
parent 7e03f5f004
commit 338286cedf

View file

@ -309,14 +309,15 @@ gst_rnd_buffer_size_src_event (GstPad * pad, GstObject * parent,
if ((flags & GST_SEEK_FLAG_FLUSH)) {
gst_pad_push_event (self->srcpad, gst_event_new_flush_start ());
gst_pad_push_event (self->sinkpad, gst_event_new_flush_start ());
gst_pad_push_event (self->srcpad, gst_event_new_flush_stop (TRUE));
gst_pad_push_event (self->sinkpad, gst_event_new_flush_stop (TRUE));
} else {
gst_pad_pause_task (self->sinkpad);
}
GST_PAD_STREAM_LOCK (self->sinkpad);
gst_pad_push_event (self->srcpad, gst_event_new_flush_stop (TRUE));
gst_pad_push_event (self->sinkpad, gst_event_new_flush_stop (TRUE));
GST_INFO_OBJECT (pad, "seeking to offset %" G_GINT64_FORMAT, start);
self->offset = start;