[FFmpeg-cvslog] avformat/apng: fix setting frame delay when max_fps is set to no limit

James Almer git at videolan.org
Wed Mar 22 01:23:39 EET 2017


ffmpeg | branch: release/3.0 | James Almer <jamrial at gmail.com> | Mon Mar 20 22:53:00 2017 -0300| [48706b9fef0c9f4594630dacfe5561c6f96cd193] | committer: James Almer

avformat/apng: fix setting frame delay when max_fps is set to no limit

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 874eb012f75bc18bb6d79ad4bc0912afa21751f3)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48706b9fef0c9f4594630dacfe5561c6f96cd193
---

 libavformat/apngdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the ffmpeg-cvslog mailing list