Преглед на файлове

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

(cherry picked from commit 94d0b654f0f8c11325e18424c7bf96f0b7f8d815)
Huts, Roman преди 2 години
родител
ревизия
e3cccac6ba
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      plugins/obs-ffmpeg/texture-amf.cpp

+ 3 - 3
plugins/obs-ffmpeg/texture-amf.cpp

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