Mismatch Between #EXTINF and #EXT-X-PROGRAM-DATE-TIME in HLS Manifest Generated by gsthlssink3

Hi,

I’m using a DeepStream-based GStreamer pipeline to generate an HLS stream using gsthlssink3, but I’ve noticed an inconsistency in the generated .m3u8 manifest:

The #EXTINF tag, which defines the duration of a segment, does not match the actual time difference between consecutive #EXT-X-PROGRAM-DATE-TIME tags. Here’s an example from the manifest:

#EXT-X-PROGRAM-DATE-TIME:2025-07-23T08:08:13.358Z
#EXTINF:6.633,
00002.ts
#EXT-X-PROGRAM-DATE-TIME:2025-07-23T08:08:19.280Z

As you can see, the #EXTINF indicates 6.633 seconds, but the actual time difference between the #EXT-X-PROGRAM-DATE-TIME tags is only 5.922 seconds.

My Pipeline:

src -> nvstreammux -> tee -> queue -> nvvideoconvert -> capsfilter -> nvv4l2h264enc -> hlssink3

Why does this mismatch happen?
How can I fix it?

RFC 8216 only states that

The EXT-X-PROGRAM-DATE-TIME tag associates the first sample of a Media Segment with an absolute date and/or time. It applies only to the next Media Segment.

The difference between successive EXT-X-PROGRAM-DATE-TIME values does not need to exactly match the EXTINF duration.

EXTINF specifies the media duration of the segment (how much playback time it contains), while EXT-X-PROGRAM-DATE-TIME maps to wall-clock time. The actual encoded segment duration might differ slightly from the target duration due to encoding constraints, frame boundaries, or other technical factors.

How exactly are you looking to use EXT-X-PROGRAM-DATE-TIME ?