Skip to content

videodecoder: use DTS if PTS unknown

The buffer should be set according to DTS if exists when we are guessin the PTS instead of segment start. The decoder can receive buffers which are before the segment in case of seek for example.

I encounter this issue with a seek in a MXF stream with H264 content. The first key frame is 500ms before the segment, so we start to receive data with a +500ms PTS which is wrong.

The segment is start=00:00:01.500 but first buffer DTS is 00:00:1.010

I guess discovering the PTS should be done on parser side. See https://bugzilla.gnome.org/show_bug.cgi?id=704193#c11 or well provided by the demuxer.

Merge request reports