batchrender asset path fix, ru xlat, fixup hevc/h265 opts, expand new bg pngs
[goodguy/history.git] / cinelerra-5.1 / cinelerra / edit.C
index 0ede9b9ef2a34acfc7dc22f38bcb52771b469055..3658922df6d816a62cc1486e396072d7900649fd 100644 (file)
@@ -150,6 +150,9 @@ int Edit::copy(int64_t start,
                                file->tag.set_title("NESTED_EDL");
                                file->tag.set_property("SRC", nested_edl->path);
                                file->append_tag();
+                               file->tag.set_title("/NESTED_EDL");
+                               file->append_tag();
+                               file->append_newline();
                        }
 
                        if(asset)
@@ -213,10 +216,8 @@ int64_t Edit::get_source_end(int64_t default_)
 void Edit::insert_transition(char *title)
 {
 //printf("Edit::insert_transition this=%p title=%p title=%s\n", this, title, title);
-       detach_transition();
-       transition = new Transition(edl,
-               this,
-               title,
+       delete transition;
+       transition = new Transition(edl, this, title,
                track->to_units(edl->session->default_transition_length, 1));
 }
 
@@ -228,10 +229,7 @@ void Edit::detach_transition()
 
 int Edit::silence()
 {
-       if(asset || nested_edl)
-               return 0;
-       else
-               return 1;
+       return asset || nested_edl ? 0 : 1;
 }
 
 
@@ -284,7 +282,7 @@ void Edit::equivalent_output(Edit *edit, int64_t *result)
                        !transition->identical(edit->transition)) ||
 // Asset changed
                (asset && edit->asset &&
-                       !asset->equivalent(*edit->asset, 1, 1)) ||
+                       !asset->equivalent(*edit->asset, 1, 1, edl)) ||
 // Nested EDL changed
                (nested_edl && edit->nested_edl &&
                        strcmp(nested_edl->path, edit->nested_edl->path))
@@ -692,11 +690,11 @@ int Edit::shift_end_out(int edit_mode,
 
 // Effects are shifted in length extension
                if(edit_plugins)
-                       edits->shift_effects_recursive(oldposition /* startproject */, 
+                       edits->shift_effects_recursive(oldposition /* startproject */,
                                cut_length,
                                edit_autos);
                if(edit_autos)
-                       edits->shift_keyframes_recursive(oldposition /* startproject */, 
+                       edits->shift_keyframes_recursive(oldposition /* startproject */,
                                cut_length);
 
                for(Edit* current_edit = next; current_edit; current_edit = current_edit->next)
@@ -800,7 +798,7 @@ int Edit::select_handle(float view_start, float zoom_units, int cursor_x, int cu
        pixel2 = right;
        pixel1 = pixel2 - 10;
 
-// test right edit     
+// test right edit
        if(cursor_x >= pixel1 && cursor_x <= pixel2)
        {
                selection = right_unit;