From 760b070db98c60fba31f4f65df00f522ee3702ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 21 Apr 2022 11:41:43 +0300 Subject: [PATCH] Revert "videorate: Update the base time on segment updates" This reverts commit 75b4809ebc23814009bebc70c775ab44d85decf2. See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186 Part-of: --- subprojects/gst-plugins-base/gst/videorate/gstvideorate.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c b/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c index d00f102..c3240c9 100644 --- a/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c +++ b/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c @@ -836,6 +836,9 @@ gst_video_rate_sink_event (GstBaseTransform * trans, GstEvent * event) gst_video_rate_swap_prev (videorate, NULL, 0); } + videorate->base_ts = 0; + videorate->out_frame_count = 0; + videorate->next_ts = GST_CLOCK_TIME_NONE; /* We just want to update the accumulated stream_time */ @@ -845,15 +848,6 @@ gst_video_rate_sink_event (GstBaseTransform * trans, GstEvent * event) segment.stop = (gint64) (segment.stop / videorate->rate); segment.time = (gint64) (segment.time / videorate->rate); - videorate->base_ts = gst_segment_position_from_running_time (&segment, - GST_FORMAT_TIME, - gst_segment_to_running_time (&videorate->segment, GST_FORMAT_TIME, - videorate->base_ts)); - videorate->next_ts = gst_segment_position_from_running_time (&segment, - GST_FORMAT_TIME, - gst_segment_to_running_time (&videorate->segment, GST_FORMAT_TIME, - videorate->next_ts)); - gst_segment_copy_into (&segment, &videorate->segment); GST_DEBUG_OBJECT (videorate, "updated segment: %" GST_SEGMENT_FORMAT, &videorate->segment); -- 2.7.4