obs-ffmpeg: Fix NVENC old codec naming removed in FFmpeg

Per FFmpeg commit 337f777f378c [1], FFmpeg removed nvenc_h264_encoder
and nvenc_hevc_encoder after deprecation in FFmpeg commit 888a5c794778
[2]. The names to be used are ff_h264_nvenc_encoder and
ff_hevc_nvenc_encoder. So we must allow alternative search of codec as
h264_nvenc or nvenc_h264 in obs-ffmpeg.c.

[1]: https://github.com/FFmpeg/FFmpeg/commit/337f777f378cfcc0d6f0d01fb7125905e8b0da55
[2]: https://github.com/FFmpeg/FFmpeg/commit/888a5c794778a2f2aad22e9b4a3952dff92b11fa
This commit is contained in:
pkv
2021-11-23 12:10:56 -05:00
committed by Ryan Foster
parent ce734366bc
commit c398ac9739
+3 -1
View File
@@ -180,7 +180,9 @@ static bool nvenc_supported(void)
bool success = false;
if (!nvenc) {
goto cleanup;
nvenc = avcodec_find_encoder_by_name("h264_nvenc");
if (!nvenc)
goto cleanup;
}
#if defined(_WIN32)