summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-06 18:13:23 +0200
committerwm4 <wm4@nowhere>2015-10-06 18:19:20 +0200
commitb4804a4b2614bca5c33e65a399e98669ece72a01 (patch)
tree9f3f60c22eb88d76867c1e929d21588193502ffc /video/decode/dec_video.h
parent5015759334214da4a85fafd54e67319e380e25bd (diff)
downloadmpv-b4804a4b2614bca5c33e65a399e98669ece72a01.tar.bz2
mpv-b4804a4b2614bca5c33e65a399e98669ece72a01.tar.xz
video: fix base for --no-correct-pts
Use the first encountered packet PTS/DTS as base, instead of the last one. This does not add the amount of frames buffered in the codec to the PTS offset, and thus is better. Also, don't add the frame time if there was no decoded frame yet. The first frame should obviously have the timestamp of the first packet (going by this heuristic).
Diffstat (limited to 'video/decode/dec_video.h')
-rw-r--r--video/decode/dec_video.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h
index 2edf8b67c4..28844f5882 100644
--- a/video/decode/dec_video.h
+++ b/video/decode/dec_video.h
@@ -59,8 +59,8 @@ struct dec_video {
double buffered_pts[64];
int num_buffered_pts;
- // PTS or DTS of packet last read
- double last_packet_pdts;
+ // PTS or DTS of packet first read
+ double first_packet_pdts;
// There was at least one packet with non-sense timestamps.
int has_broken_packet_pts; // <0: uninitialized, 0: no problems, 1: broken