1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

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>
This commit is contained in:
yusuke iijima
2026-09-28 16:34:13 +09:00
committed by James Almer
parent d85cdd2597
commit e45aa1bf83

View File

@@ -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)