From 5f8f998d0ec9f2d4f790926ea7f676fdf423c1a7 Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Mon, 6 Jun 2016 09:18:46 -0700 Subject: [PATCH] mux: Presence of unknown chunks should trigger VP8X chunk output. As per the spec (https://developers.google.com/speed/webp/docs/riff_container), only the extended file format can contain an unknown chunk. So, when assembling a WebP file with muxer, whenever there is an unknown chunk present, we should create a VP8X chunk (even though none of the features are present). BUG=webp:294 Change-Id: I5da52d311e1853d40063d0f5026100d4325effaa --- src/mux/muxedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mux/muxedit.c b/src/mux/muxedit.c index b27663f8..9bbed42b 100644 --- a/src/mux/muxedit.c +++ b/src/mux/muxedit.c @@ -558,8 +558,8 @@ static WebPMuxError CreateVP8XChunk(WebPMux* const mux) { height = mux->canvas_height_; } - if (flags == 0) { - // For Simple Image, VP8X chunk should not be added. + if (flags == 0 && mux->unknown_ == NULL) { + // For simple file format, VP8X chunk should not be added. return WEBP_MUX_OK; }