Commit e45aa1bf83 for ffmpeg
commit e45aa1bf8302248484bfea1b67fa3b60f477743c
Author: yusuke iijima <yiijima@gmail.com>
Date: Mon Sep 28 16:34:13 2026 +0900
avfilter/deinterlace_vaapi: keep previous PTS in 64 bits
prev_pts stores an AVFrame timestamp but is declared as int. When the
input PTS exceeds the range of int, the narrowing conversion changes
the value used to extrapolate the second field timestamp at EOF.
With a 1/90000 input time base and 32-bit int, this can happen after
about 6 hours and 38 minutes. On the tested platform, the final output
timestamp jumps forward by 2^32 ticks in the 1/180000 output time base,
or about 23861 seconds. This can greatly inflate the output duration.
Store prev_pts as int64_t to preserve the input timestamp. The EOF
calculation and the normal field interpolation remain unchanged.
Signed-off-by: yusuke iijima <yiijima@gmail.com>
diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c
index 4bb109336a..7e35fbd24d 100644
--- a/libavfilter/vf_deinterlace_vaapi.c
+++ b/libavfilter/vf_deinterlace_vaapi.c
@@ -47,7 +47,7 @@ typedef struct DeintVAAPIContext {
int extra_delay_for_timestamps;
int eof;
- int prev_pts;
+ int64_t prev_pts;
} DeintVAAPIContext;
static const char *deint_vaapi_mode_name(int mode)