obs-ffmpeg: Fix logic in one of the AMF preset fallback checks

This commit is contained in:
Huts, Roman 2023-06-15 14:29:57 -04:00 committed by Ryan Foster
parent 4d5b6eb50f
commit 94d0b654f0

View file

@ -454,12 +454,12 @@ static inline void check_preset_compatibility(amf_base *enc,
* throughput, switch to a lower preset. */
if (astrcmpi(preset, "highQuality") == 0) {
if (enc->max_throughput - enc->requested_throughput <
enc->throughput) {
if (!enc->max_throughput) {
preset = "quality";
set_opt(QUALITY_PRESET, get_preset(enc, preset));
} else {
if (enc->max_throughput < enc->throughput) {
if (enc->max_throughput - enc->requested_throughput <
enc->throughput) {
preset = "quality";
refresh_throughput_caps(enc, preset);
}