Skip to content

Commit

Permalink
Demote FFmpeg fatal errors
Browse files Browse the repository at this point in the history
Fixes #1849
  • Loading branch information
cgutman committed Dec 30, 2023
1 parent eca26e6 commit 0d7811a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,9 @@ main(int argc, char *argv[]) {
char buffer[1024];

av_log_format_line(ptr, level, fmt, vl, buffer, sizeof(buffer), &print_prefix);
if (level <= AV_LOG_FATAL) {
BOOST_LOG(fatal) << buffer;
}
else if (level <= AV_LOG_ERROR) {
if (level <= AV_LOG_ERROR) {
// We print AV_LOG_FATAL at the error level. FFmpeg prints things as fatal that
// are expected in some cases, such as lack of codec support or similar things.
BOOST_LOG(error) << buffer;
}
else if (level <= AV_LOG_WARNING) {
Expand Down

0 comments on commit 0d7811a

Please sign in to comment.