Skip to content

Commit

Permalink
check for undefined scaling_mode enums
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Dec 18, 2024
1 parent 229dbd8 commit 33ec3d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libheif/common_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ uint32_t get_subsampled_size_h(uint32_t width,
case scaling_mode::is_divisible:
assert(width % chromaSubH == 0);
return width / chromaSubH;
default:
assert(false);
return 0;
}
} else {
return width;
Expand All @@ -107,6 +110,9 @@ uint32_t get_subsampled_size_v(uint32_t height,
case scaling_mode::is_divisible:
assert(height % chromaSubV == 0);
return height / chromaSubV;
default:
assert(false);
return 0;
}
} else {
return height;
Expand Down

0 comments on commit 33ec3d6

Please sign in to comment.