obs-ffmpeg: Fix nvenc_h264 deprecated message

The encoder name was changed from "nvenc_h264" to "h264_nvenc", and will
throw a warning in the log file if you use the former, so try the latter
first, then the former.
master
jp9000 2016-12-21 19:27:55 -08:00
parent c11572fddf
commit cef4cba576
1 changed files with 3 additions and 1 deletions

View File

@ -272,7 +272,9 @@ static void *nvenc_create(obs_data_t *settings, obs_encoder_t *encoder)
enc = bzalloc(sizeof(*enc));
enc->encoder = encoder;
enc->nvenc = avcodec_find_encoder_by_name("nvenc_h264");
enc->nvenc = avcodec_find_encoder_by_name("h264_nvenc");
if (!enc->nvenc)
enc->nvenc = avcodec_find_encoder_by_name("nvenc_h264");
enc->first_packet = true;
blog(LOG_INFO, "---------------------------------");