From 539f5a688f1b425ef4c335b34a139f86d19db77b Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Mon, 10 Oct 2016 11:44:35 +0200 Subject: [PATCH] Fix non-included header in config.c. When compiling as experimental, WEBP_EXPERIMENTAL_FEATURES would not be defined because the header defining it would not be included. Hence runtime errors in debug mode when running: ./cwebp -lossles whatever ... Error! Cannot encode picture as WebP Error code: 4 (INVALID_CONFIGURATION: configuration is invalid) (detail: WebPConfig would have a random value set for delta_palettization as config.c does not consider it to exist.) Change-Id: I41761cffe81a971130ed514b195a73d1c6dac1b7 --- src/enc/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/enc/config.c b/src/enc/config.c index 3ed395e8..f7975ffc 100644 --- a/src/enc/config.c +++ b/src/enc/config.c @@ -11,6 +11,10 @@ // // Author: Skal (pascal.massimino@gmail.com) +#ifdef HAVE_CONFIG_H +#include "../webp/config.h" +#endif + #include "../webp/encode.h" //------------------------------------------------------------------------------