mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
gif2webp: don't store loop-count if there's only 1 frame
BUG=webp:504 Change-Id: Iacea11a861096ae950379c872d9840bdbec42a21
This commit is contained in:
parent
9c367bc602
commit
373eb170f1
@ -465,8 +465,10 @@ int main(int argc, const char* argv[]) {
|
||||
fprintf(stderr, "%s\n", WebPAnimEncoderGetError(enc));
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (!loop_compatibility) {
|
||||
// If there's only one frame, we don't need to handle loop count.
|
||||
if (frame_number == 1) {
|
||||
loop_count = 0;
|
||||
} else if (!loop_compatibility) {
|
||||
if (!stored_loop_count) {
|
||||
// if no loop-count element is seen, the default is '1' (loop-once)
|
||||
// and we need to signal it explicitly in WebP. Note however that
|
||||
|
Loading…
Reference in New Issue
Block a user