only print GIF_DISPOSE_WARNING once

Change-Id: Iece235a6ee767cc2e3866bb6c9bb1d56d9a9ffb9
This commit is contained in:
skal 2013-10-08 15:02:33 +02:00
parent 6a8c0eb718
commit 0deaf0fa44

View File

@ -475,7 +475,11 @@ int main(int argc, const char *argv[]) {
if (data[0] != 4) goto End;
frame.duration = delay * 10; // Duration is in 1 ms units for WebP.
if (dispose == 3) {
fprintf(stderr, "WARNING: GIF_DISPOSE_RESTORE not supported.");
static int warning_printed = 0;
if (!warning_printed) {
fprintf(stderr, "WARNING: GIF_DISPOSE_RESTORE unsupported.\n");
warning_printed = 1;
}
// failsafe. TODO(urvang): emulate the correct behaviour by
// recoding the whole frame.
frame.dispose_method = WEBP_MUX_DISPOSE_BACKGROUND;