png img proxy fixes, speed zoom segv fix, colapse ins 1frm silence undo, repair rende...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / atrack.C
index 1ef123dae4fdd014aa0be421ca415068b56bb9fe..ee39162ac00b6ceffd6987477d592b3c0d059807 100644 (file)
@@ -127,7 +127,7 @@ int ATrack::load_defaults(BC_Hash *defaults)
 
 void ATrack::set_default_title()
 {
-       Track *current = ListItem<Track>::owner->first;
+       Track *current = ListItem<Track>::list->first;
        int i;
        for(i = 0; current; current = NEXT)
        {
@@ -139,10 +139,8 @@ void ATrack::set_default_title()
 
 int64_t ATrack::to_units(double position, int round)
 {
-       if(round)
-               return Units::round(position * edl->session->sample_rate);
-       else
-               return Units::to_int64(position * edl->session->sample_rate);
+       return round ? Units::round(position * edl->session->sample_rate) :
+               Units::to_int64(position * edl->session->sample_rate + 1e-6);
 }
 
 double ATrack::to_doubleunits(double position)