summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 19:32:57 +0100
committerwm4 <wm4@nowhere>2015-01-06 19:32:57 +0100
commit24c805331dff910c716ceb76926e78ff1357e23a (patch)
tree9792a628b5e6a9dce56091ff48c70c503336f949
parent64e86b5b4ded09765a571796d1dff8cc6177d997 (diff)
downloadmpv-24c805331dff910c716ceb76926e78ff1357e23a.tar.bz2
mpv-24c805331dff910c716ceb76926e78ff1357e23a.tar.xz
video: fix timeline with some container formats
Using edl or --merge-files with .avi files didn't work, because the DTS was not offset. Only the PTS was adjusted, which led to nonsense timestamps.
-rw-r--r--player/video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c
index 21b8e58f3a..121f1a0bbe 100644
--- a/player/video.c
+++ b/player/video.c
@@ -384,6 +384,8 @@ static int decode_image(struct MPContext *mpctx)
return VD_WAIT;
if (pkt && pkt->pts != MP_NOPTS_VALUE)
pkt->pts += mpctx->video_offset;
+ if (pkt && pkt->dts != MP_NOPTS_VALUE)
+ pkt->dts += mpctx->video_offset;
if ((pkt && pkt->pts >= mpctx->hrseek_pts - .005) ||
d_video->has_broken_packet_pts ||
!mpctx->opts->hr_seek_framedrop)