X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginclient.h;h=50d50608f27ab584f75520243fc72b634a28d284;hp=8abf7666dbf39ea4877a160dc5605e7045027133;hb=ddfda6a8cc59bda4dc734973c1c5fecaa31ea487;hpb=9782ed720c4e992ed0427de68c6646720c9b44e4 diff --git a/cinelerra-5.1/cinelerra/pluginclient.h b/cinelerra-5.1/cinelerra/pluginclient.h index 8abf7666..50d50608 100644 --- a/cinelerra-5.1/cinelerra/pluginclient.h +++ b/cinelerra-5.1/cinelerra/pluginclient.h @@ -107,34 +107,26 @@ PluginClientWindow* plugin_class::new_window() \ #define LOAD_CONFIGURATION_MACRO(plugin_class, config_class) \ int plugin_class::load_configuration() \ { \ - KeyFrame *prev_keyframe, *next_keyframe; \ - prev_keyframe = get_prev_keyframe(get_source_position()); \ - next_keyframe = get_next_keyframe(get_source_position()); \ - \ - int64_t next_position = edl_to_local(next_keyframe->position); \ + KeyFrame * prev_keyframe = get_prev_keyframe(get_source_position()); \ int64_t prev_position = edl_to_local(prev_keyframe->position); \ - \ config_class old_config, prev_config, next_config; \ old_config.copy_from(config); \ read_data(prev_keyframe); \ prev_config.copy_from(config); \ - read_data(next_keyframe); \ - next_config.copy_from(config); \ + KeyFrame * next_keyframe = get_next_keyframe(get_source_position()); \ + if( next_keyframe ) { \ + int64_t next_position = edl_to_local(next_keyframe->position); \ + read_data(next_keyframe); \ + next_config.copy_from(config); \ \ - config.interpolate(prev_config, \ - next_config, \ - (next_position == prev_position) ? \ - get_source_position() : \ - prev_position, \ - (next_position == prev_position) ? \ - get_source_position() + 1 : \ - next_position, \ - get_source_position()); \ - \ - if(!config.equivalent(old_config)) \ - return 1; \ - else \ - return 0; \ + config.interpolate(prev_config, next_config, \ + (next_position == prev_position) ? \ + get_source_position() : prev_position, \ + (next_position == prev_position) ? \ + get_source_position() + 1 : next_position, \ + get_source_position()); \ + } \ + return !config.equivalent(old_config) ? 1 : 0; \ } @@ -381,7 +373,7 @@ public: // console. This gets a keyframe from the EDL, with the position set to the // EDL tracking position. int send_configure_change(); - + virtual void span_keyframes(KeyFrame *src, int64_t start, int64_t end); // Called from process_buffer // Returns 1 if a GUI is open so OpenGL routines can determine if