Skip to content

Commit 33ec3d6

Browse files
committedDec 18, 2024·
check for undefined scaling_mode enums
1 parent 229dbd8 commit 33ec3d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎libheif/common_utils.cc

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ uint32_t get_subsampled_size_h(uint32_t width,
8181
case scaling_mode::is_divisible:
8282
assert(width % chromaSubH == 0);
8383
return width / chromaSubH;
84+
default:
85+
assert(false);
86+
return 0;
8487
}
8588
} else {
8689
return width;
@@ -107,6 +110,9 @@ uint32_t get_subsampled_size_v(uint32_t height,
107110
case scaling_mode::is_divisible:
108111
assert(height % chromaSubV == 0);
109112
return height / chromaSubV;
113+
default:
114+
assert(false);
115+
return 0;
110116
}
111117
} else {
112118
return height;

0 commit comments

Comments
 (0)
Please sign in to comment.