vp9parse: Correct the pts for frames inside a super frame.

Merged He Junyan requested to merge He_Junyan/gstreamer:vp9_parse_time_stamp into main

When the alignment is "FRAME" and the parse is likely connecting to a decoder, the current PTS setting for VP9 frames inside a super frame is not very correct.

The super frame always begin with non-displayed frames and end with a displayed frame. The current way will assign the PTS to the first non-displayed frame, which is a decode-only frame and the PTS will be discarded in the video decoder. While the last displayed frame has invalid PTS, and so the video decoder needs to guess its PTS based on the frame rate and previous frame's PTS. This is not a decent and robust way. And more important, when previous frames provide DTS, the video decoder will also guess the PTS based on previous frames' DTS and trigger the warning:

decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a super frame, let the non-displayed frames have no PTS while set the correct PTS to the displayed one.

Merge request reports