summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <[email protected]>2017-03-20 22:53:00 -0300
committerJames Almer <[email protected]>2017-03-21 20:21:53 -0300
commitb014fa21d4a36eb65e61b530bdafbcdc63d79795 (patch)
tree42219fb59bbc744d1feb7ccafb35322973153426
parent8e4abfbb9dbc6ff192926e4d6befef40897a5479 (diff)
avformat/apng: fix setting frame delay when max_fps is set to no limit
Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]> (cherry picked from commit 874eb012f75bc18bb6d79ad4bc0912afa21751f3)
-rw-r--r--libavformat/apngdec.c2
1 files changed, 1 insertions, 1 deletions
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;
}