1
0
mirror of https://github.com/marqs85/ossc.git synced 2024-06-18 05:29:33 +00:00

Improve avoidance of profile load induced profile loads

It was buggy anyway, as pointed out by borti4938.
This commit is contained in:
Ari Sundholm 2018-03-15 01:03:54 +02:00 committed by Ari Sundholm
parent 0bb490faa0
commit b464a9224b

View File

@ -67,7 +67,6 @@ alt_u8 target_typemask;
alt_u8 target_type; alt_u8 target_type;
alt_u8 stable_frames; alt_u8 stable_frames;
alt_u8 update_cur_vm; alt_u8 update_cur_vm;
alt_u8 omit_profile_load;
alt_u8 vm_sel, vm_edit, profile_sel, input_profiles[AV_LAST], lt_sel, def_input, profile_link; alt_u8 vm_sel, vm_edit, profile_sel, input_profiles[AV_LAST], lt_sel, def_input, profile_link;
alt_u16 tc_h_samplerate, tc_h_synclen, tc_h_bporch, tc_h_active, tc_v_synclen, tc_v_bporch, tc_v_active; alt_u16 tc_h_samplerate, tc_h_synclen, tc_h_bporch, tc_h_active, tc_v_synclen, tc_v_bporch, tc_v_active;
@ -555,7 +554,8 @@ int load_profile() {
// Also prevent the change of input from inducing a profile load. // Also prevent the change of input from inducing a profile load.
if (tc.link_av != AV_LAST && tc.link_av != cm.avinput) { if (tc.link_av != AV_LAST && tc.link_av != cm.avinput) {
target_input = tc.link_av; target_input = tc.link_av;
omit_profile_load = 1; input_profiles[profile_link ? target_input : AV_TESTPAT]
= profile_sel;
} }
write_userdata(INIT_CONFIG_SLOT); write_userdata(INIT_CONFIG_SLOT);
@ -773,7 +773,6 @@ int main()
ths_input_t target_ths = 0; ths_input_t target_ths = 0;
pcm_input_t target_pcm = 0; pcm_input_t target_pcm = 0;
video_format target_format = 0; video_format target_format = 0;
omit_profile_load = 0;
status_t status; status_t status;
@ -860,13 +859,10 @@ int main()
// The input changed, so load the appropriate profile if // The input changed, so load the appropriate profile if
// input->profile link is enabled // input->profile link is enabled
if (profile_link && (profile_sel != input_profiles[target_input]) && if (profile_link && (profile_sel != input_profiles[target_input])) {
!omit_profile_load)
{
profile_sel = input_profiles[target_input]; profile_sel = input_profiles[target_input];
read_userdata(profile_sel); read_userdata(profile_sel);
} }
omit_profile_load = 0;
cm.avinput = target_input; cm.avinput = target_input;
cm.sync_active = 0; cm.sync_active = 0;