anonymous contribution for much improved ChromakeyHSV plugin menu with boxes to set...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / denoiseseltempavg / seltempavg.C
index 6bff65acd4a688cf14867863dd360292d3c67021..0e9248fff30ffd420f39193446ef5dcc7458fb16 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -881,9 +882,9 @@ void SelTempAvgMain::update_gui()
 {
        if(thread)
        {
+               ((SelTempAvgWindow*)thread->window)->lock_window("SelTempAvgMain::update_gui");
                if(load_configuration())
                {
-                       ((SelTempAvgWindow*)thread->window)->lock_window("SelTempAvgMain::update_gui");
                        ((SelTempAvgWindow*)thread->window)->total_frames->update(config.frames);
 
                        ((SelTempAvgWindow*)thread->window)->method_none->update(         config.method == SelTempAvgConfig::METHOD_NONE);
@@ -911,10 +912,10 @@ void SelTempAvgMain::update_gui()
                        ((SelTempAvgWindow*)thread->window)->mask_RY->update(config.mask_RY);
                        ((SelTempAvgWindow*)thread->window)->mask_GU->update(config.mask_GU);
                        ((SelTempAvgWindow*)thread->window)->mask_BV->update(config.mask_BV);
-                       ((SelTempAvgWindow*)thread->window)->unlock_window();
                }
                ((SelTempAvgWindow*)thread->window)->offset_restartmarker_pos->update((int64_t)restartoffset);
                ((SelTempAvgWindow*)thread->window)->offset_restartmarker_keyframe->update((config.offset_restartmarker_keyframe) && (onakeyframe));
+               ((SelTempAvgWindow*)thread->window)->unlock_window();
        }
 }