From 579349b21cefba50cdd7993efcdcf958378f7007 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 24 Dec 2023 07:01:56 -0500 Subject: [PATCH] screenshot: remove artificial limit on the number of screenshots taken This allows taking more than 99999 screenshots in a single session, and also for the case when a sequence of 99999 screenshots already exists on the filesystem. --- player/screenshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/screenshot.c b/player/screenshot.c index e4d0912679..f537fc4604 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -166,7 +166,7 @@ static char *create_fname(struct MPContext *mpctx, char *template, goto error_exit; char fmtstr[] = {'%', '0', digits, 'd', '\0'}; res = talloc_asprintf_append(res, fmtstr, *frameno); - if (*frameno < 100000 - 1) { + if (*frameno < INT_MAX - 1) { (*frameno) += 1; (*sequence) += 1; }