From 48706b9fef0c9f4594630dacfe5561c6f96cd193 Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 20 Mar 2017 22:53:00 -0300 Subject: [PATCH] avformat/apng: fix setting frame delay when max_fps is set to no limit Reviewed-by: Michael Niedermayer Signed-off-by: James Almer (cherry picked from commit 874eb012f75bc18bb6d79ad4bc0912afa21751f3) --- libavformat/apngdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index c6403a191d..d9f9ee3f30 100644 --- a/libavformat/apngdec.c +++ b/libavformat/apngdec.c @@ -269,7 +269,7 @@ static int decode_fctl_chunk(AVFormatContext *s, APNGDemuxContext *ctx, AVPacket /* default is hundredths of seconds */ if (!delay_den) delay_den = 100; - if (!delay_num || delay_den / delay_num > ctx->max_fps) { + if (!delay_num || (ctx->max_fps && delay_den / delay_num > ctx->max_fps)) { delay_num = 1; delay_den = ctx->default_fps; }