ins mixers, match all and move for mixer align, cr in xml string kludge, save_as...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / edits.C
index 9e3c2a5efcd63a0d52b3cf42df26935420d9fd72..ae7ab0c7d3ef8edf15119a71aeaa3728dc8a3e76 100644 (file)
@@ -326,6 +326,14 @@ int Edits::optimize()
                }
        }
 
+// trim edits before position 0
+       while( first && first->startproject+first->length < 0 )
+               delete first;
+       if( first && first->startproject < 0 ) {
+               first->length += first->startproject;
+               first->startproject = 0;
+       }
+
 // Insert silence between edits which aren't consecutive
        for(current = last; current; current = current->previous)
        {