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>2022-10-05 18:00:59 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-10-27 00:03:16 +0300
commitc865a2b9c3d5aa2a16dfea54ca7336cd564d13fa (patch)
tree7d565b87e4ebd95f878909730abd1c1a123873fc
parentfef136b3d07eebfd87fce29e8c2726c97daf7b26 (diff)
videosink: Don't return unknown end-time from get_times()
... in case of reverse playback. Otherwise basesink will not wait for clock Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3277>
-rw-r--r--subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c
index 67d634af0c..8450a429c6 100644
--- a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c
+++ b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c
@@ -273,6 +273,12 @@ gst_video_sink_get_times (GstBaseSink * bsink, GstBuffer * buffer,
*end = timestamp +
gst_util_uint64_scale_int (GST_SECOND, vsink->priv->info.fps_d,
vsink->priv->info.fps_n);
+ } else if (bsink->segment.rate < 0) {
+ /* The end time will be used for clock waiting time position
+ * in case of revese playback, and unknown end time will result in
+ * never waiting for clock (as if sync=false).
+ * Returning timestamp here would be the best effort we can do */
+ *end = timestamp;
}
}
}