mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
[libvpx] scan-build: Division by zero - measure_square_diff_partial()
This commit is contained in:
parent
9c70b0229a
commit
4e78f63847
@ -3017,7 +3017,7 @@ static int measure_square_diff_partial(YV12_BUFFER_CONFIG *source,
|
|||||||
// Only return non-zero if we have at least ~1/16 samples for estimate.
|
// Only return non-zero if we have at least ~1/16 samples for estimate.
|
||||||
if (num_blocks > (tot_num_blocks >> 4)) {
|
if (num_blocks > (tot_num_blocks >> 4)) {
|
||||||
assert(num_blocks != 0);
|
assert(num_blocks != 0);
|
||||||
return (Total / num_blocks);
|
return num_blocks ? (Total / num_blocks) : 0;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user