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 21, 2024
1 parent 8f51dff commit 6306f91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/analyzer/analyzerebur128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ 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 inf and -inf that slipped through in libebur for some reason..
// TODO Move this to a VERIFY_OR_DEBUG_ASSERT() once the root cause
// has been identified.
util_isinf(averageLufs) != 0 ||
averageLufs == 0.0) {
qWarning() << "AnalyzerEbur128::storeResults() averageLufs invalid:"
<< averageLufs;
return;
Expand Down

0 comments on commit 6306f91

Please sign in to comment.