diff options
author | wm4 <wm4@nowhere> | 2016-02-28 20:29:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-28 20:29:51 +0100 |
commit | 1f436f65f2ee4df6419ca68bd6426b8283db6d22 (patch) | |
tree | e682d41f0c292b5ff480f50f80178eaacd33a784 | |
parent | 90010836852927833f1f8afca28489382ff4dd83 (diff) |
video: fix hr-seek
Hr-seek was often off by one frame due to rounding issues, which have
been traditionally taken care off by adding a "tolerance". Essentially,
frames very close to the seek target PTS are not dropped, even if they
may strictly are before the seek target.
Commit 0af53353 accidentally removed this by always removing frames even
if they're within the "tolerance". Fix this by "unsharing" the logic and
making sure the segment code is inactive for normal seeks.
-rw-r--r-- | video/decode/dec_video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 80b5379d2d..e8a57749ab 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -432,7 +432,9 @@ void video_work(struct dec_video *d_video) if (d_video->current_mpi && d_video->current_mpi->pts != MP_NOPTS_VALUE) { double vpts = d_video->current_mpi->pts; segment_ended = d_video->end != MP_NOPTS_VALUE && vpts >= d_video->end; - if ((start_pts != MP_NOPTS_VALUE && vpts < start_pts) || segment_ended) { + if ((d_video->start != MP_NOPTS_VALUE && vpts < d_video->start) + || segment_ended) + { talloc_free(d_video->current_mpi); d_video->current_mpi = NULL; } |