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
This commit is contained in:
Urvang Joshi 2016-06-06 09:18:46 -07:00
parent cadec0b126
commit 5f8f998d0e

View File

@ -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;
}