Commit f9d81744 authored by Sebastian Dröge's avatar Sebastian Dröge Committed by Tim-Philipp Müller
Browse files

imagefreeze: Only start the task after a seek if a buffer was received already

parent f152f6e2
...@@ -540,6 +540,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event) ...@@ -540,6 +540,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event)
GstSeekType start_type, stop_type; GstSeekType start_type, stop_type;
gint64 start, stop; gint64 start, stop;
gint64 last_stop; gint64 last_stop;
gboolean start_task;
gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
&stop_type, &stop); &stop_type, &stop);
...@@ -601,6 +602,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event) ...@@ -601,6 +602,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event)
self->need_segment = TRUE; self->need_segment = TRUE;
last_stop = self->segment.last_stop; last_stop = self->segment.last_stop;
start_task = self->buffer != NULL;
GST_OBJECT_UNLOCK (self); GST_OBJECT_UNLOCK (self);
if ((flags & GST_SEEK_FLAG_FLUSH)) { if ((flags & GST_SEEK_FLAG_FLUSH)) {
...@@ -622,8 +624,9 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event) ...@@ -622,8 +624,9 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event)
GST_DEBUG_OBJECT (pad, "Seek successful"); GST_DEBUG_OBJECT (pad, "Seek successful");
gst_pad_start_task (self->srcpad, if (start_task)
(GstTaskFunction) gst_image_freeze_src_loop, self->srcpad); gst_pad_start_task (self->srcpad,
(GstTaskFunction) gst_image_freeze_src_loop, self->srcpad);
ret = TRUE; ret = TRUE;
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment