summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 19:32:57 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:07 +0900
commit704c24776a44ad1ce5e7360d514b29be4ac6d245 (patch)
tree9d2b9379309f25322544f410a4ca949ce69caa05 /player
parentcc32aa436e21be055c4cb1e3149fb316e3c4e7df (diff)
downloadmpv-704c24776a44ad1ce5e7360d514b29be4ac6d245.tar.bz2
mpv-704c24776a44ad1ce5e7360d514b29be4ac6d245.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.
Diffstat (limited to 'player')
-rw-r--r--player/video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c
index 4f696512b1..ac63ec47f2 100644
--- a/player/video.c
+++ b/player/video.c
@@ -380,6 +380,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)