Selaa lähdekoodia

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

(cherry picked from commit 94d0b654f0f8c11325e18424c7bf96f0b7f8d815)
Huts, Roman 2 vuotta sitten
vanhempi
sitoutus
e3cccac6ba
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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);
 			}