vwebp: Copy Chrome's behavior w/frame duration == 0

BUG=webp:380

Change-Id: Ia0b108d7da755ff91cf6c84581412e47a3a6e5d9
(cherry picked from commit fd3d5756cb)
This commit is contained in:
Vincent Rabaud 2018-04-20 10:55:42 +02:00 committed by James Zern
parent d20b770713
commit e6b2164e3a

View File

@ -205,6 +205,11 @@ static void decode_callback(int what) {
} }
} }
duration = curr->duration; 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()) { if (!Decode()) {
kParams.decoding_error = 1; kParams.decoding_error = 1;