From: Good Guy Date: Sat, 9 Sep 2017 15:22:32 +0000 (-0600) Subject: direct integrals for floatautos, clipboard fix X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=d26ed189093987978190ee07f485a4840746c13c;p=goodguy%2Fhistory.git direct integrals for floatautos, clipboard fix --- diff --git a/cinelerra-5.1/cinelerra/amodule.C b/cinelerra-5.1/cinelerra/amodule.C index 1ef4a4fa..7fc0140b 100644 --- a/cinelerra-5.1/cinelerra/amodule.C +++ b/cinelerra-5.1/cinelerra/amodule.C @@ -282,15 +282,8 @@ speed_fragment_len); FloatAuto *previous = 0; FloatAuto *next = 0; FloatAutos *speed_autos = (FloatAutos*)track->automation->autos[AUTOMATION_SPEED]; - for(int64_t i = edit_startproject; i < start_project; i++) - { - double speed = speed_autos->get_value(i, - PLAY_FORWARD, - previous, - next); - speed_position += speed; - } - + speed_position += speed_autos->automation_intergal(edit_startproject, + start_project-edit_startproject, PLAY_FORWARD); speed_position1 = speed_position; diff --git a/cinelerra-5.1/cinelerra/autos.C b/cinelerra-5.1/cinelerra/autos.C index 1f169df2..0ca1efcf 100644 --- a/cinelerra-5.1/cinelerra/autos.C +++ b/cinelerra-5.1/cinelerra/autos.C @@ -204,7 +204,7 @@ Auto* Autos::get_prev_auto(int64_t position, while(current && current->position > position) current = PREVIOUS; } - if(!current) + if(!current && first && first->position <= position) { for(current = last; current && current->position > position; @@ -222,7 +222,7 @@ Auto* Autos::get_prev_auto(int64_t position, while(current && current->position < position) current = NEXT; } - if(!current) + if(!current && last && last->position >= position) { for(current = first; current && current->position < position; @@ -311,7 +311,7 @@ Auto* Autos::get_next_auto(int64_t position, int direction, Auto* ¤t, int while(current && current->position < position) current = NEXT; } - if(!current) + if(!current && last && last->position > position) { for(current = first; current && current->position <= position; @@ -330,7 +330,7 @@ Auto* Autos::get_next_auto(int64_t position, int direction, Auto* ¤t, int while(current && current->position > position) current = PREVIOUS; } - if(!current) + if(!current && first && first->position <= position) { for(current = last; current && current->position > position; diff --git a/cinelerra-5.1/cinelerra/clippopup.C b/cinelerra-5.1/cinelerra/clippopup.C index 4fd6af69..602fbbd0 100644 --- a/cinelerra-5.1/cinelerra/clippopup.C +++ b/cinelerra-5.1/cinelerra/clippopup.C @@ -354,7 +354,7 @@ int ClipPasteToFolder::handle_event() gui->lock_window("ClipPasteToFolder::handle_event 1"); int64_t len = gui->clipboard_len(BC_PRIMARY_SELECTION); if( len ) { - char *string = new char[len + 1]; + char *string = new char[len]; gui->from_clipboard(string, len, BC_PRIMARY_SELECTION); const char *clip_header = "