[FFmpeg-devel] [PATCH 1/2] avformat/apng: fix setting frame delay when max_fps is set to no limit

James Almer jamrial at gmail.com
Tue Mar 21 04:03:22 EET 2017


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/apngdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index bb17896ee5..7a284e32c2 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;
     }
-- 
2.12.0



More information about the ffmpeg-devel mailing list