rtmp-services: Type check apply_encoder_settings
This fixes ovewritting hidden "profile" setting in ffmpeg vaapi which is a number and not a string. It also shouldnt be overwritten as it is required on some AMD hardware for the encoder to work.
This commit is contained in:
parent
f41d0d9d77
commit
d9470770a0
@ -485,7 +485,9 @@ static void apply_video_encoder_settings(obs_data_t *settings,
|
||||
obs_data_set_string(settings, "rate_control", "CBR");
|
||||
|
||||
item = json_object_get(recommended, "profile");
|
||||
if (json_is_string(item)) {
|
||||
obs_data_item_t *enc_item = obs_data_item_byname(settings, "profile");
|
||||
if (json_is_string(item) &&
|
||||
obs_data_item_gettype(enc_item) == OBS_DATA_STRING) {
|
||||
const char *profile = json_string_value(item);
|
||||
obs_data_set_string(settings, "profile", profile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user