|
@@ -486,7 +486,10 @@ static bool init_encoder_h264(struct nvenc_data *enc, obs_data_t *settings)
|
|
|
config->profileGUID = NV_ENC_H264_PROFILE_HIGH_GUID;
|
|
|
}
|
|
|
|
|
|
- apply_user_args(enc);
|
|
|
+ if (!apply_user_args(enc)) {
|
|
|
+ obs_encoder_set_last_error(enc->encoder, obs_module_text("Opts.Invalid"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if (NV_FAILED(nv.nvEncInitializeEncoder(enc->session, &enc->params))) {
|
|
|
return false;
|
|
@@ -595,7 +598,10 @@ static bool init_encoder_hevc(struct nvenc_data *enc, obs_data_t *settings)
|
|
|
hevc_config->outputBitDepth = profile_is_10bpc ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
|
|
|
#endif
|
|
|
|
|
|
- apply_user_args(enc);
|
|
|
+ if (!apply_user_args(enc)) {
|
|
|
+ obs_encoder_set_last_error(enc->encoder, obs_module_text("Opts.Invalid"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if (NV_FAILED(nv.nvEncInitializeEncoder(enc->session, &enc->params))) {
|
|
|
return false;
|
|
@@ -679,7 +685,10 @@ static bool init_encoder_av1(struct nvenc_data *enc, obs_data_t *settings)
|
|
|
av1_config->numBwdRefs = 1;
|
|
|
av1_config->repeatSeqHdr = 1;
|
|
|
|
|
|
- apply_user_args(enc);
|
|
|
+ if (!apply_user_args(enc)) {
|
|
|
+ obs_encoder_set_last_error(enc->encoder, obs_module_text("Opts.Invalid"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if (NV_FAILED(nv.nvEncInitializeEncoder(enc->session, &enc->params))) {
|
|
|
return false;
|