Skip to content

vtenc: apply DTS offset to ensure DTS <= PTS

Andoni Morales Alastruey requested to merge ylatuya/gstreamer:fix-2357 into main

The VideoToolBox API provides DTS timestamps that don't follow GStreamer's semantics, which require DTS <= PTS.

Frame 0 dts: 0:00:00.000000000, pts: 0:00:00.000000000
Frame 1 dts: 0:00:00.040000000, pts: 0:00:00.080000000
Frame 2 dts: 0:00:00.080000000, pts: 0:00:00.040000000

This patch applies the same offset used in all encoders to ensure we don't have negative DTS and it computes the offset required to respect the convention.

Fixes #2357 (closed)

Edited by Andoni Morales Alastruey

Merge request reports

Loading