Avoid using dts. Never calculate anything from pts, just pass it along. You
may have to re scale it if he expects it in [ms]

Pts should be attached to the buffer passed to the decoder. It will on
output give you the pts back. The order of what you pass into the decoder
is not what you will get out.

On input the pts ts will look jumbled around, but the decoder will reorder
this on output before giving you it back.

Don't try to adjust the timestamp in any way.