WebPIoInitFromOptions: treat use_scaling as a bool

this matches the description in WebPDecoderOptions and prevents a
mismatch between the user supplied options and the ones used by io.

Bug: chromium:1196773, chromium:1196775, chromium:1196480
Change-Id: I3603b806884cfc6969b093d06b7980b0cc13199b
This commit is contained in:
James Zern 2021-04-20 14:23:57 -07:00
parent 3b12b7f4b4
commit b6cf52d5b8

View File

@ -821,7 +821,7 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
io->mb_h = h;
// Scaling
io->use_scaling = (options != NULL) && (options->use_scaling > 0);
io->use_scaling = (options != NULL) && options->use_scaling;
if (io->use_scaling) {
int scaled_width = options->scaled_width;
int scaled_height = options->scaled_height;