diff options
author | wm4 <wm4@nowhere> | 2015-11-16 23:15:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-16 23:17:33 +0100 |
commit | 85450d06a1b1a08fce277f7f14d5ee33b12f8eab (patch) | |
tree | ce03648a54db276113bbf5d29ce78a3e4c265460 /player/video.c | |
parent | 70df1608d6f74f3eba9a5e593822984194f63951 (diff) | |
download | mpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.bz2 mpv-85450d06a1b1a08fce277f7f14d5ee33b12f8eab.tar.xz |
player: use demuxer ts offset to simplify timeline ts handling
Use the demux_set_ts_offset() added in the previous commit to base each
timeline segment to use timestamps according to its relative position
within the overall timeline. As a consequence we don't need to care
about these timestamps anymore, and everything becomes simpler.
(Another minor but delicious nugget of sanity.)
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/player/video.c b/player/video.c index 531ad2ee06..c90f4091a7 100644 --- a/player/video.c +++ b/player/video.c @@ -390,10 +390,6 @@ static int decode_image(struct MPContext *mpctx) struct demux_packet *pkt; if (demux_read_packet_async(d_video->header, &pkt) == 0) 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) |