mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 21:13:04 +02:00
obs-ffmpeg: Only set x264 opts if actually x264
Check the actual name of the codec before applying an x264-specific preset so we don't encounter an "Invalid argument" error when using other h264 encoders in FFmpeg (such as NVEnc). Closes jp9000/obs-studio#412
This commit is contained in:
parent
3fb00756c1
commit
f29f286402
@ -150,7 +150,7 @@ static bool open_video_codec(struct ffmpeg_data *data)
|
||||
char **opts = strlist_split(data->config.video_settings, ' ', false);
|
||||
int ret;
|
||||
|
||||
if (data->vcodec->id == AV_CODEC_ID_H264)
|
||||
if (strcmp(data->vcodec->name, "libx264") == 0)
|
||||
av_opt_set(context->priv_data, "preset", "veryfast", 0);
|
||||
|
||||
if (opts) {
|
||||
|
Loading…
Reference in New Issue
Block a user