diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-07-11 12:37:05 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-07-12 16:14:58 +0200 |
commit | 68860526e96eb2c938e984757236f2a7b66ade41 (patch) | |
tree | dc0c34e8e26e56bbcc98f682d3824c749fc2b110 | |
parent | 7932f62891eea5c14194ba7ee7addbfa1fd6d3ce (diff) | |
download | gstreamer-68860526e96eb2c938e984757236f2a7b66ade41.tar.gz |
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
-rw-r--r-- | libs/gst/base/gstbasesink.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index a610e2eb91..2754d01414 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1758,14 +1758,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 @@ -1840,6 +1835,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: |