Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
ffmpeg/tools: Actually use the score
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaymar committed Sep 28, 2019
1 parent 6bc1cb9 commit 38e7639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/ffmpeg/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ AVPixelFormat ffmpeg::tools::get_best_compatible_format(const AVPixelFormat* lis

for (auto fmt = list; fmt && (*fmt != AV_PIX_FMT_NONE); fmt++) {
auto found = format_compatibility.find(std::pair{source, *fmt});
if (found != format_compatibility.end()) {
if (found != format_compatibility.end() && (score < found->second)) {
score = found->second;
best = *fmt;
}
Expand Down

0 comments on commit 38e7639

Please sign in to comment.