From 1208ef637a2b868c33e7da1154e0a1a3c1728f84 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 13 Jun 2018 13:19:54 +0200 Subject: [PATCH] videoencoder: Keep the segment position in sync If the start of the segment is modified, the position should be modified accordingly https://bugzilla.gnome.org/show_bug.cgi?id=796576 --- gst-libs/gst/video/gstvideoencoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c index b4af98de6c..2e40a91ef1 100644 --- a/gst-libs/gst/video/gstvideoencoder.c +++ b/gst-libs/gst/video/gstvideoencoder.c @@ -939,6 +939,9 @@ gst_video_encoder_push_event (GstVideoEncoder * encoder, GstEvent * event) if (encoder->priv->time_adjustment != GST_CLOCK_TIME_NONE) { segment.start += encoder->priv->time_adjustment; + if (GST_CLOCK_TIME_IS_VALID (segment.position)) { + segment.position += encoder->priv->time_adjustment; + } if (GST_CLOCK_TIME_IS_VALID (segment.stop)) { segment.stop += encoder->priv->time_adjustment; }