Skip to content

Commit

Permalink
Initialize jxl structures with zeros. Fixes VS17.0 build error. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Nov 17, 2021
1 parent 5acdcc3 commit 25f6963
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frmts/gtiff/tif_jxl.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ JXLPreDecode(TIFF* tif, uint16_t s)
return 0;
}

JxlPixelFormat format = {};
JxlPixelFormat format = {0};
format.num_channels = td->td_planarconfig == PLANARCONFIG_CONTIG ?
td->td_samplesperpixel : 1;
format.data_type = jxlDataType;
Expand Down Expand Up @@ -484,12 +484,12 @@ JXLPostEncode(TIFF* tif)
return 0;
}

JxlPixelFormat format = {};
JxlPixelFormat format = {0};
format.data_type = GetJXLDataType(tif);
format.endianness = JXL_NATIVE_ENDIAN;
format.align = 0;

JxlBasicInfo basic_info = {};
JxlBasicInfo basic_info = {0};
JxlEncoderInitBasicInfo(&basic_info);
basic_info.xsize = sp->segment_width;
basic_info.ysize = sp->segment_height;
Expand Down Expand Up @@ -574,7 +574,7 @@ JXLPostEncode(TIFF* tif)
return 0;
}

JxlColorEncoding color_encoding = {};
JxlColorEncoding color_encoding = {0};
JxlColorEncodingSetToSRGB(&color_encoding, /*is_gray*/
(td->td_planarconfig==PLANARCONFIG_SEPARATE ||
td->td_samplesperpixel <= 2));
Expand Down

0 comments on commit 25f6963

Please sign in to comment.