obs-x264: Don't show buffer size if buffer size off
Whether buffer size is visible is determined by the value of the "Use buffer size" property (the "use_bufsize" setting). (Commit edited and formatted by Jim: separated this code from the previous commit, and gave it a proper commit message) Closes jp9000/obs-studio#567
This commit is contained in:
parent
2fb1d18056
commit
2d2ca06f6d
@ -142,6 +142,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
const char *rc = obs_data_get_string(settings, "rate_control");
|
||||
bool use_bufsize = obs_data_get_bool(settings, "use_bufsize");
|
||||
bool abr = astrcmpi(rc, "CBR") == 0 || astrcmpi(rc, "ABR") == 0;
|
||||
bool rc_crf = astrcmpi(rc, "CRF") == 0;
|
||||
|
||||
@ -153,7 +154,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
|
||||
p = obs_properties_get(ppts, "use_bufsize");
|
||||
obs_property_set_visible(p, !rc_crf);
|
||||
p = obs_properties_get(ppts, "buffer_size");
|
||||
obs_property_set_visible(p, !rc_crf);
|
||||
obs_property_set_visible(p, !rc_crf && use_bufsize);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user