X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fcrikey%2Fcrikey.C;h=2f22fed98adf620db3442ef8221a76c8e42b2bb9;hb=HEAD;hp=92b7495849e13de91f429d031aa10434291ecef3;hpb=20002b54e92573aafc97cbc3a85ec529b35bb191;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/crikey/crikey.C b/cinelerra-5.1/plugins/crikey/crikey.C index 92b74958..2f22fed9 100644 --- a/cinelerra-5.1/plugins/crikey/crikey.C +++ b/cinelerra-5.1/plugins/crikey/crikey.C @@ -116,14 +116,15 @@ void CriKeyConfig::interpolate(CriKeyConfig &prev, CriKeyConfig &next, int prev_sz = prev.points.size(), next_sz = next.points.size(); for( int i=0; ix, y = pt->y; + float x = pt->x, y = pt->y, t = pt->t; int k = next_sz; // associated by tag id in next while( --k >= 0 && pt->tag != (nt=next.points[k])->tag ); if( k >= 0 ) { x = x * prev_scale + nt->x * next_scale; y = y * prev_scale + nt->y * next_scale; + t = t * prev_scale + nt->t * next_scale; } - add_point(pt->tag, pt->e, x, y, pt->t); + add_point(pt->tag, pt->e, x, y, t); } } @@ -273,7 +274,7 @@ void CriKey::save_data(KeyFrame *keyframe) FileXML output; // cause data to be stored directly in text - output.set_shared_output(keyframe->get_data(), MESSAGESIZE); + output.set_shared_output(keyframe->xbuf); output.tag.set_title("CRIKEY"); output.tag.set_property("THRESHOLD", config.threshold); @@ -305,7 +306,7 @@ void CriKey::save_data(KeyFrame *keyframe) void CriKey::read_data(KeyFrame *keyframe) { FileXML input; - input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); + input.set_shared_input(keyframe->xbuf); config.points.remove_all_objects(); int result = 0;