From 6f9059f85838dccea278402bad7e94cb254af594 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 26 May 2019 14:03:06 +0200 Subject: player: replace a magic numer by another magic number This code attempts to seek to the last frame by seeking close to the end, and then decoding until the last frame has been reached. To do so it sets hrseek_lastframe, which for video enables some logic to "catch" this last frame, and completely ignores hrseek_pts. But audio still may use hrseek_pts I don't know if the original author (me) was thinking, if anything, when setting this variable to 1e99, essentially a random, number. It's very large, and a timestamp like this will never happen, so it does its job. But it's random. Use INFINITY instead. It will skip all audio samples in the audio code correctly. This change doesn't fix anything, but it does get rid of the random looking number. --- player/playloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/playloop.c b/player/playloop.c index de02728061..3dafb35f3f 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -847,7 +847,7 @@ void seek_to_last_frame(struct MPContext *mpctx) }); // Make it exact: stop seek only if last frame was reached. if (mpctx->hrseek_active) { - mpctx->hrseek_pts = 1e99; // "infinite" + mpctx->hrseek_pts = INFINITY; mpctx->hrseek_lastframe = true; } } -- cgit v1.2.3