Skip to content

Commit 11f2322

Browse files
rhutsAMDRytoEX
authored andcommitted
obs-ffmpeg: Fix throughput checks for older AMD driver
1 parent 2964d54 commit 11f2322

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

plugins/obs-ffmpeg/texture-amf.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ static inline void check_preset_compatibility(amf_base *enc, const char *&preset
422422
* encoder properties. If the throughput is lower than the max
423423
* throughput, switch to a lower preset. */
424424

425+
refresh_throughput_caps(enc, preset);
425426
if (astrcmpi(preset, "highQuality") == 0) {
426427
if (!enc->max_throughput) {
427428
preset = "quality";
@@ -447,9 +448,14 @@ static inline void check_preset_compatibility(amf_base *enc, const char *&preset
447448
}
448449

449450
if (astrcmpi(preset, "balanced") == 0) {
450-
if (enc->max_throughput && enc->max_throughput - enc->requested_throughput < enc->throughput) {
451+
if (!enc->max_throughput) {
451452
preset = "speed";
452-
refresh_throughput_caps(enc, preset);
453+
set_opt(QUALITY_PRESET, get_preset(enc, preset));
454+
} else {
455+
if (enc->max_throughput - enc->requested_throughput < enc->throughput) {
456+
preset = "speed";
457+
refresh_throughput_caps(enc, preset);
458+
}
453459
}
454460
}
455461
}

0 commit comments

Comments
 (0)