Commit 7971318f for libheif
commit 7971318f4cad0e49283de7c0950ba77605596d7d
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Thu Mar 12 17:34:22 2026 +0100
unci: fix 16bit vs 32bit component index warning
diff --git a/libheif/codecs/uncompressed/unc_dec.cc b/libheif/codecs/uncompressed/unc_dec.cc
index 43a44f1d..c831d0e3 100644
--- a/libheif/codecs/uncompressed/unc_dec.cc
+++ b/libheif/codecs/uncompressed/unc_dec.cc
@@ -59,7 +59,7 @@ int Decoder_uncompressed::get_luma_bits_per_pixel() const
int luma_bits = 0;
int alternate_channel_bits = 0;
for (Box_uncC::Component component : m_uncC->get_components()) {
- uint16_t component_index = component.component_index;
+ uint32_t component_index = component.component_index;
if (component_index >= m_cmpd->get_components().size()) {
return -1;
}
@@ -103,7 +103,7 @@ int Decoder_uncompressed::get_chroma_bits_per_pixel() const
int chroma_bits = 0;
int alternate_channel_bits = 0;
for (Box_uncC::Component component : m_uncC->get_components()) {
- uint16_t component_index = component.component_index;
+ uint32_t component_index = component.component_index;
if (component_index >= m_cmpd->get_components().size()) {
return -1;
}