clear cache for undo/redo, alt-# range chk, shortcuts docs, plugin_set segv
[goodguy/history.git] / cinelerra-5.1 / plugins / motion-cv / motion-cv.C
index 5e4a1c19cd2196d4438467ee9aa4ee8df7fb8edb..b434e42a7b6c6b9756b92da357e3416c086a4bbd 100644 (file)
@@ -261,7 +261,7 @@ void MotionCVMain::save_data(KeyFrame *keyframe)
 
 // cause data to be stored directly in text
        output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
-       output.tag.set_title("MOTION");
+       output.tag.set_title("MOTIONCV");
 
        output.tag.set_property("BLOCK_COUNT", config.block_count);
        output.tag.set_property("GLOBAL_POSITIONS", config.global_positions);
@@ -290,7 +290,7 @@ void MotionCVMain::save_data(KeyFrame *keyframe)
        output.tag.set_property("HORIZONTAL_ONLY", config.horizontal_only);
        output.tag.set_property("VERTICAL_ONLY", config.vertical_only);
        output.append_tag();
-       output.tag.set_title("/MOTION");
+       output.tag.set_title("/MOTIONCV");
        output.append_tag();
        output.terminate_string();
 }
@@ -302,7 +302,7 @@ void MotionCVMain::read_data(KeyFrame *keyframe)
        int result = 0;
 
        while( !(result = input.read_tag()) ) {
-               if( input.tag.title_is("MOTION") ) {
+               if( input.tag.title_is("MOTIONCV") ) {
                        config.block_count = input.tag.get_property("BLOCK_COUNT", config.block_count);
                        config.global_positions = input.tag.get_property("GLOBAL_POSITIONS", config.global_positions);
                        config.rotate_positions = input.tag.get_property("ROTATE_POSITIONS", config.rotate_positions);
@@ -652,7 +652,7 @@ printf("MotionCVMain::process_buffer 1 start_position=%jd\n", start_position);
            config.mode2 == MotionCVConfig::SAVE ) {
                reset_cache_file();
                char save_file[BCTEXTLEN];
-               sprintf(save_file, "%s.sav", config.tracking_file);
+               snprintf(save_file, sizeof(save_file), "%s.sav", config.tracking_file);
 #ifdef DEBUG
 printf("MotionCVMain::process_buffer 2 rename tracking file: %s to %s\n",
  config.tracking_file, save_file);
@@ -1320,7 +1320,7 @@ int MotionCVMain::put_cache_line(const char *line)
        if( key == active_key ) return 1;
        if( !active_fp ) {
                close_cache_file();
-               sprintf(cache_file, "%s.bak", config.tracking_file);
+               snprintf(cache_file, sizeof(cache_file), "%s.bak", config.tracking_file);
                ::rename(config.tracking_file, cache_file);
                if( !(active_fp = fopen(config.tracking_file, "w")) ) {
                        perror(config.tracking_file);