From ff45b7b119f9339e01facd234a79b9be31fbdb68 Mon Sep 17 00:00:00 2001 From: Lucian Poston Date: Thu, 18 Jan 2018 01:34:15 -0800 Subject: [PATCH] obs-ffmpeg: Call av_register_all before nvenc check Closes jp9000/obs-studio#1157 --- plugins/obs-ffmpeg/obs-ffmpeg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c index ac10c5bf5..abcb87299 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #ifndef __APPLE__ @@ -147,7 +148,10 @@ typedef NVENCSTATUS (NVENCAPI *NVENCODEAPICREATEINSTANCE)( static bool nvenc_supported(void) { + av_register_all(); + profile_start(nvenc_check_name); + AVCodec *nvenc = avcodec_find_encoder_by_name("nvenc_h264"); void *lib = NULL; void *cudalib = NULL;