diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-08-18 14:50:20 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-05 17:04:13 +0100 |
commit | 7f531a82c33b7a1867133d84d6344fb668eb33b8 (patch) | |
tree | 3129b218de5e8f67fcd7cabacb1c12226dc8de02 | |
parent | 967d1ad416bc8a886043a137ea4b0cfc74cbb533 (diff) | |
download | qtwebengine-chromium-7f531a82c33b7a1867133d84d6344fb668eb33b8.tar.gz |
Fix improper boolean values
jpeg_codec.cc contained some implicit conversions to boolean, which
is apparently problematic for some versions of libjpeg. Patch
taken from https://bugs.chromium.org/p/chromium/issues/detail?id=686191
but not backported, since it has not been accepted into chromium yet.
Task-Number: QTBUG-58482
Change-Id: I2c5d5894493d6a7d0698a4e5a7191288a2fdfeb4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/ui/gfx/codec/jpeg_codec.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chromium/ui/gfx/codec/jpeg_codec.cc b/chromium/ui/gfx/codec/jpeg_codec.cc index 5ff77d782b8..dff1726d81f 100644 --- a/chromium/ui/gfx/codec/jpeg_codec.cc +++ b/chromium/ui/gfx/codec/jpeg_codec.cc @@ -108,7 +108,7 @@ void InitSource(j_decompress_ptr cinfo) { // set to a positive value if TRUE is returned. A FALSE return should only // be used when I/O suspension is desired." boolean FillInputBuffer(j_decompress_ptr cinfo) { - return false; + return FALSE; } // Skip data in the buffer. Since we have all the data at once, this operation @@ -211,7 +211,7 @@ bool JPEGCodec::Decode(const unsigned char* input, size_t input_size, cinfo.client_data = &state; // fill the file metadata into our buffer - if (jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK) + if (jpeg_read_header(&cinfo, TRUE) != JPEG_HEADER_OK) return false; // we want to always get RGB data out |