Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-07-07 14:11:13 +0300
committerSeungha Yang <seungha@centricular.com>2021-07-20 15:14:32 +0300
commitb1b5b2d4cd5f95696dafdaee60606b4d02a125a6 (patch)
treec83b62d1a5367c89cdfda81093f242e303297be0
parentab6faaeeb40bc63a175c91645d9920cbcb53547b (diff)
basesink: Don't swap rstart/rstop when stepping
Step handling is implemented based on unmodified start/stop segment running time, and basesink takes rate into account for stepping. This commit is partially undoing new behavior introduced by the commit of 39b9cc554c960fec8d41f8394c41390883cadeed when stepping. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848>
-rw-r--r--libs/gst/base/gstbasesink.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index 36fec5ff2d..0a116d6b9b 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -2205,7 +2205,11 @@ do_times:
rstop = gst_segment_to_running_time (segment, format, cstop);
/* In reverse playback, play from stop to start */
- if (segment->rate < 0.0 && GST_CLOCK_TIME_IS_VALID (rstop)) {
+ if (segment->rate < 0.0 && GST_CLOCK_TIME_IS_VALID (rstop)
+ /* FIXME: Current stepping implemenation expects unmodified rstart/rstop
+ * for reverse playback. Don't swap those values when stepping
+ * unless stepping code is updated as such */
+ && !step->valid) {
GstClockTime tmp = rstart;
rstart = rstop;
rstop = tmp;