user avatar
codecs: nvv4l2: support all different timestamps
CTCaer authored
Various packets and players have different timestamps defined.

For example old mpeg videos do not have PTS and many streaming apps or other players do not have or remove PTS.

In such cases if user pts (reordered_opaque) is not set, set AV_NOPTS_VALUE instead of 0.

In cases where user PTS is provided, use a flag so we know in capture plane that this is the case. Then set pts to AV_NOPTS_VALUE and reordered opaque properly.

That works quite well with NVV4L2 because it reorders the frames automatically.
And so we just need to set the proper timestamp on queued buffer, along with a flag to identify it's not PTS but user based PTS.
1d0dbfb7
Name Last commit Last update