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
This commit is contained in:
Edward Hervey 2018-06-13 13:19:54 +02:00 committed by Edward Hervey
parent a4a27fdca8
commit 1208ef637a

View file

@ -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;
}