From e6b2164e3a3677f38c903cea57ecce879b05f133 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Fri, 20 Apr 2018 10:55:42 +0200 Subject: [PATCH] vwebp: Copy Chrome's behavior w/frame duration == 0 BUG=webp:380 Change-Id: Ia0b108d7da755ff91cf6c84581412e47a3a6e5d9 (cherry picked from commit fd3d5756cb7c63ba78c73297f755f072751d4aed) --- examples/vwebp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/vwebp.c b/examples/vwebp.c index b19465cd..a79c72cb 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -205,6 +205,11 @@ static void decode_callback(int what) { } } duration = curr->duration; + // Behavior copied from Chrome, cf: + // https://cs.chromium.org/chromium/src/third_party/WebKit/Source/ + // platform/graphics/DeferredImageDecoder.cpp? + // rcl=b4c33049f096cd283f32be9a58b9a9e768227c26&l=246 + if (duration <= 10) duration = 100; } if (!Decode()) { kParams.decoding_error = 1;