Skip to content

Commit

Permalink
AnalyzerEbur128: catch invalid return values inf/-inf
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Sep 23, 2024
1 parent 3b9ef39 commit 19f699f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/analyzer/analyzerebur128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ void AnalyzerEbur128::storeResults(TrackPointer pTrack) {
qWarning() << "AnalyzerEbur128::storeResults() failed with" << e;
return;
}
if (averageLufs == -HUGE_VAL || averageLufs == 0.0) {
if (averageLufs == -HUGE_VAL ||
averageLufs == HUGE_VAL ||
// This catches 0 and abnormal values inf and -inf (that may have
// slipped through in libebur for some reason.
util_isnormal(averageLufs)) {
qWarning() << "AnalyzerEbur128::storeResults() averageLufs invalid:"
<< averageLufs;
return;
Expand Down

0 comments on commit 19f699f

Please sign in to comment.