mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user