From 3b95b17753d3448b7ca6ccc460e4acdb7cd81884 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 11 Apr 2021 17:31:27 -0700 Subject: [PATCH] Don't show EOF errors by default when decoding, as they're usually nothing to worry about and pollute the log. --- src/plugins/ffmpegdecoder/FfmpegDecoder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp b/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp index 17ae773d4..e02a347be 100644 --- a/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp +++ b/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp @@ -64,6 +64,11 @@ static std::string getAvError(int errnum) { } static void logAvError(const std::string& method, int errnum) { +#ifndef ENABLE_LOG_AVERROR_EOF + if (errnum == AVERROR_EOF) { + return; /* these are generally legit; no need to pollute the log */ + } +#endif if (errnum != 0) { std::string err = method + "() failed: " + getAvError(errnum); ::debug->Warning(TAG, err.c_str());