From: Wim Taymans Date: Wed, 11 Jul 2012 10:37:05 +0000 (+0200) Subject: basesink: handle step end correctly X-Git-Tag: RELEASE-0.11.93~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c42b6720d9a68d97acb4503deeaeae70158b2e4;p=platform%2Fupstream%2Fgstreamer.git basesink: handle step end correctly when we have a new step event with a -1 amount, make sure that we follow the regular code path so that the stop_end handler is called as usual. This takes care of flushing the buffer in case of a flushing step and also posts a step end message. See https://bugzilla.gnome.org/show_bug.cgi?id=679378 --- diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 2a20f23..00bfcc8 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1517,14 +1517,9 @@ start_stepping (GstBaseSink * sink, GstSegment * segment, GST_DEBUG_OBJECT (sink, "step started at running_time %" GST_TIME_FORMAT, GST_TIME_ARGS (current->start)); - if (current->amount == -1) { - GST_DEBUG_OBJECT (sink, "step amount == -1, stop stepping"); - current->valid = FALSE; - } else { - GST_DEBUG_OBJECT (sink, "step amount: %" G_GUINT64_FORMAT ", format: %s, " - "rate: %f", current->amount, gst_format_get_name (current->format), - current->rate); - } + GST_DEBUG_OBJECT (sink, "step amount: %" G_GUINT64_FORMAT ", format: %s, " + "rate: %f", current->amount, gst_format_get_name (current->format), + current->rate); } static void @@ -1595,6 +1590,9 @@ handle_stepping (GstBaseSink * sink, GstSegment * segment, { gboolean step_end = FALSE; + if (current->amount == -1) + return TRUE; + /* see if we need to skip this buffer because of stepping */ switch (current->format) { case GST_FORMAT_TIME: