obs-ffmpeg: Use codec enum for amf_properties_internal

This commit is contained in:
Roman Huts
2022-11-07 23:34:21 -08:00
committed by jp9000
parent acfad45ead
commit 21d079fdcc
+4 -4
View File
@@ -948,7 +948,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
return true;
}
static obs_properties_t *amf_properties_internal(bool hevc)
static obs_properties_t *amf_properties_internal(amf_codec_type codec)
{
obs_properties_t *props = obs_properties_create();
obs_property_t *p;
@@ -986,7 +986,7 @@ static obs_properties_t *amf_properties_internal(bool hevc)
add_preset("speed");
#undef add_preset
if (!hevc) {
if (amf_codec_type::AVC == codec) {
p = obs_properties_add_list(props, "profile",
obs_module_text("Profile"),
OBS_COMBO_TYPE_LIST,
@@ -1014,13 +1014,13 @@ static obs_properties_t *amf_properties_internal(bool hevc)
static obs_properties_t *amf_avc_properties(void *unused)
{
UNUSED_PARAMETER(unused);
return amf_properties_internal(false);
return amf_properties_internal(amf_codec_type::AVC);
}
static obs_properties_t *amf_hevc_properties(void *unused)
{
UNUSED_PARAMETER(unused);
return amf_properties_internal(true);
return amf_properties_internal(amf_codec_type::HEVC);
}
/* ========================================================================= */