From c9f12b50862987192da7ed1d169dba299a5c1242 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 6 Oct 2022 00:00:59 +0900 Subject: [PATCH] videosink: Don't return unknown end-time from get_times() ... in case of reverse playback. Otherwise basesink will not wait for clock Part-of: --- .../gst-plugins-base/gst-libs/gst/video/gstvideosink.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } } }