When loading a file that has an index already generated and also includes 
clips, waveform is not shown on first load (attached b.xml). 

The problem seems to come from difference in loading media as part of clips or 
as part of main edl. In the former case, the assets keep INDEX_NOTTESTED flag 
which prevents showing the waveform.

The patch simply makes sure that first the main EDL is loaded and then both the 
vwindow and clips EDLs...

i get "waveform" not shown bugs reported in person a lot lately, so i hope this 
is the fix, but there might be additional cause for it also.

bye
andraz

Attachment: b.xml
Description: application/xml

diff -ru --exclude-from exclude hvirtual-cvs/cinelerra/mwindowedit.C hvirtual-2/cinelerra/mwindowedit.C
--- hvirtual-cvs/cinelerra/mwindowedit.C	2005-11-12 12:12:47.000000000 +0100
+++ hvirtual-2/cinelerra/mwindowedit.C	2006-05-15 00:22:52.000000000 +0200
@@ -1248,26 +1248,6 @@
 	}
 SET_TRACE
 
-// Assume any paste operation from the same EDL won't contain any clips.
-// If it did it would duplicate every clip here.
-	for(int i = 0; i < new_edls->total; i++)
-	{
-		EDL *new_edl = new_edls->values[i];
-
-		for(int j = 0; j < new_edl->clips.total; j++)
-		{
-			edl->add_clip(new_edl->clips.values[j]);
-		}
-
-		if(new_edl->vwindow_edl)
-		{
-			if(edl->vwindow_edl) delete edl->vwindow_edl;
-			edl->vwindow_edl = new EDL(edl);
-			edl->vwindow_edl->create_objects();
-			edl->vwindow_edl->copy_all(new_edl->vwindow_edl);
-		}
-	}
-SET_TRACE
 
 // Create new tracks in master EDL
 	if(load_mode == LOAD_REPLACE || 
@@ -1497,6 +1477,27 @@
 			current_position += edl_length;
 	}
 
+// Move loading of clips and vwindow to the end - this fixes some strange issue, for index not being shown
+// Assume any paste operation from the same EDL won't contain any clips.
+// If it did it would duplicate every clip here.
+	for(int i = 0; i < new_edls->total; i++)
+	{
+		EDL *new_edl = new_edls->values[i];
+
+		for(int j = 0; j < new_edl->clips.total; j++)
+		{
+			edl->add_clip(new_edl->clips.values[j]);
+		}
+
+		if(new_edl->vwindow_edl)
+		{
+			if(edl->vwindow_edl) delete edl->vwindow_edl;
+			edl->vwindow_edl = new EDL(edl);
+			edl->vwindow_edl->create_objects();
+			edl->vwindow_edl->copy_all(new_edl->vwindow_edl);
+		}
+	}
+SET_TRACE
 
 
 SET_TRACE

Reply via email to