Skip to content

Commit

Permalink
initialize values
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 7, 2024
1 parent b638e38 commit 88568e0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libheif/codecs/uncompressed/unc_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ Error UncompressedImageCodec::get_heif_chroma_uncompressed(const std::shared_ptr
const std::shared_ptr<const Box_cmpd>& cmpd,
heif_chroma* out_chroma, heif_colorspace* out_colourspace)
{
*out_chroma = heif_chroma_undefined;
*out_colourspace = heif_colorspace_undefined;

Error error = check_header_validity(std::nullopt, cmpd, uncC);
if (error) {
return error;
}

*out_chroma = heif_chroma_undefined;
*out_colourspace = heif_colorspace_undefined;

if (isKnownUncompressedFrameConfigurationBoxProfile(uncC)) {
*out_chroma = heif_chroma_444;
*out_colourspace = heif_colorspace_RGB;
Expand Down Expand Up @@ -438,8 +438,9 @@ Result<std::shared_ptr<HeifPixelImage>> UncompressedImageCodec::create_image(con
uint32_t height)
{
auto img = std::make_shared<HeifPixelImage>();
heif_chroma chroma;
heif_colorspace colourspace;
heif_chroma chroma = heif_chroma_undefined;
heif_colorspace colourspace = heif_colorspace_undefined;

Error error = get_heif_chroma_uncompressed(uncC, cmpd, &chroma, &colourspace);
if (error) {
return error;
Expand Down

0 comments on commit 88568e0

Please sign in to comment.