Don't show EOF errors by default when decoding, as they're usually nothing to worry about and pollute the log.

This commit is contained in:
casey langen 2021-04-11 17:31:27 -07:00
parent 16af22a7d1
commit 3b95b17753

View File

@ -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());