summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-30 15:51:47 +0100
committerwm4 <wm4@nowhere>2015-12-30 15:51:47 +0100
commit2059ba2c40c4c696713f56c7e69285a265a8adb4 (patch)
treed61fbc7d1df02b507f7a82dab2dcbbaf0054aa9a
parent492e3deb956a0c9d8ce7ed0d6f25aa0737ae7f50 (diff)
downloadmpv-2059ba2c40c4c696713f56c7e69285a265a8adb4.tar.bz2
mpv-2059ba2c40c4c696713f56c7e69285a265a8adb4.tar.xz
video: do not disable hr-seek framedrop too early
This didn't make too much sense, and just made seeking slower. Strictly suggest the decoder to drop a frame if its PTS is before the seek target.
-rw-r--r--player/video.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/player/video.c b/player/video.c
index 84981b1144..70c12e63c0 100644
--- a/player/video.c
+++ b/player/video.c
@@ -391,15 +391,13 @@ 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 >= mpctx->hrseek_pts - .005) ||
- d_video->has_broken_packet_pts ||
- !mpctx->opts->hr_seek_framedrop)
+ bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING;
+ int framedrop_type = check_framedrop(mpctx);
+ if (hrseek && pkt && pkt->pts < mpctx->hrseek_pts - .005 &&
+ !d_video->has_broken_packet_pts && mpctx->opts->hr_seek_framedrop)
{
- mpctx->hrseek_framedrop = false;
+ framedrop_type = 2;
}
- bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING;
- int framedrop_type = hrseek && mpctx->hrseek_framedrop ?
- 2 : check_framedrop(mpctx);
d_video->waiting_decoded_mpi =
video_decode(d_video, pkt, framedrop_type);
bool had_packet = !!pkt;