From: Julien Isorce Date: Thu, 26 Jan 2017 16:51:21 +0000 (+0000) Subject: baseparse: correctly handle non-flush seek X-Git-Tag: 1.12.0~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2c05cac8e50204d9ded4a858618c8b8b5b00910;p=platform%2Fupstream%2Fgstreamer.git baseparse: correctly handle non-flush seek Otherwise when seeking/looping to the start when reaching the end, the sink waits for the duration of the stream. So the user hears nothing for the duration of the stream before it actually loop again. See example attached to the bug for that. Existing test: gst-plugins-good/tests/icles/test-segment-seeks foo.flac Without the patch the user hears a crack/cut at each seek. https://bugzilla.gnome.org/show_bug.cgi?id=777780 --- diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 34b40eb..2751239 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -4644,10 +4644,6 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event) gst_pad_push_event (parse->srcpad, gst_event_ref (fevent)); gst_pad_push_event (parse->sinkpad, fevent); gst_base_parse_clear_queues (parse); - } else { - /* keep track of our position */ - seeksegment.base = gst_segment_to_running_time (&seeksegment, - seeksegment.format, parse->segment.position); } memcpy (&parse->segment, &seeksegment, sizeof (GstSegment));