From: wzqzero <1918583...@qq.com> When converting a two-minute 3840 x 2160 video to a GIF file, the viewing duration is shorter than the source duration when you use ffmpeg -i, which is due to data overflow, which causes positive numbers to become negative after being assigned, causing the gif_skip_subblocks to fail.
Signed-off-by: wzqzero <1918583...@qq.com> --- libavformat/gifdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c index d5f06adc64..b026fa34ea 100644 --- a/libavformat/gifdec.c +++ b/libavformat/gifdec.c @@ -99,9 +99,9 @@ static int resync(AVIOContext *pb) return 0; } -static int gif_skip_subblocks(AVIOContext *pb) +static int64_t gif_skip_subblocks(AVIOContext *pb) { - int sb_size, ret = 0; + int64_t sb_size, ret = 0; while (0x00 != (sb_size = avio_r8(pb))) { if ((ret = avio_skip(pb, sb_size)) < 0) -- 2.43.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".