mxfdemux: Handle temporal offset with PTS < DTS
This is similar to how the same issue was handled in qtdemux.
In order for the "DTS <= PTS" constraint to be respected, we calculate the maximum temporal reordering that can happen (via index tables).
If there is a non-0 temporal reordering, we:
- Shift all outgoing PTS by that amount
- Shift segment for that stream by that amount
- Don't modify DTS (i.e. they might end up having negative running-time, before the start of the segment)
The final PTS for an index should also include the temporal offset of the index. In a temporal reordering, buffers are now having corrrect PTS out of the parser/decoder
Fixes:
(and maybe a lot of other issues)
Forked from !2338 (closed)
Edited by Nicolas Dufresne