Skip to content
Snippets Groups Projects
Commit 576630ee authored by Steve Lhomme's avatar Steve Lhomme
Browse files

demux: mkv: shift the timestamps based on the biggest CodecDelay


The CodecDelay needs to be substracted from the PTS of all frames of that
track. That may result in negative DTS, PTS and PCR which is not well handled.
So we just shift all timestamps based on the biggest CodecDelay so all
timestamps are always positive.

This is in line with how libavformat reports the timestamps on frames from a
track with a CodecDelay.

This is done per segment as other segments may use a different CodecDelay
per track.

Fixes #25129

(cherry picked from commit 45036317) (edited)
edited:
- 3.0 uses mtime_t instead of vlc_tick_t

Signed-off-by: default avatarSteve Lhomme <robux4@ycbcr.xyz>
parent db55aaa0
No related branches found
No related tags found
2 merge requests!3533Backport MR 3236 to 3.0.x,!982[3.0] demux: mkv: shift the timestamps based on the biggest CodecDelay
Pipeline #164921 passed with stage
in 25 minutes and 28 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment