[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:41 EET 2017


ffmpeg | branch: release/3.2 | James Almer <jamrial at gmail.com> | Mon Mar 20 22:53:00 2017 -0300| [33978a49c02575f509aa969a6cbd2b27790fa503] | 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=33978a49c02575f509aa969a6cbd2b27790fa503
---

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

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index bb17896..7a284e3 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