Few small leak fixes and one fix for wrongly creating new edits - instead of 
being vedit and aedit ... it was simple Edit

The third patch is fix for wrong transitions being applyed - reuse of cached 
plugin servers was not done correctly.

bye
andraz
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/fileogg.C hvirtual-2.1/cinelerra/fileogg.C
--- hvirtual-svn/cinelerra/fileogg.C	2006-10-12 23:17:43.000000000 +0200
+++ hvirtual-2.1/cinelerra/fileogg.C	2007-02-09 22:23:20.000000000 +0100
@@ -62,6 +62,10 @@
 			vorbis_info_clear(&tf->vi);
 			vorbis_comment_clear(&tf->vc);
 		}
+		if (tf->vpage)
+			free(tf->vpage);
+		if (tf->apage)
+			free(tf->apage);
 		delete tf;
 	}
 	if (temp_frame) delete temp_frame;
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/packagerenderer.C hvirtual-2.1/cinelerra/packagerenderer.C
--- hvirtual-svn/cinelerra/packagerenderer.C	2006-10-12 12:09:08.000000000 +0200
+++ hvirtual-2.1/cinelerra/packagerenderer.C	2007-02-09 22:20:24.000000000 +0100
@@ -77,6 +77,7 @@
 	delete audio_cache;
 	delete video_cache;
 	delete vconfig;
+	delete aconfig;
 }
 
 // PackageRenderer::initialize happens only once for every node when doing rendering session
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/trackcanvas.C hvirtual-2.1/cinelerra/trackcanvas.C
--- hvirtual-svn/cinelerra/trackcanvas.C	2007-02-09 13:20:47.000000000 +0100
+++ hvirtual-2.1/cinelerra/trackcanvas.C	2007-02-09 22:19:09.000000000 +0100
@@ -2117,6 +2117,7 @@
 									auto_colors[i],
 									auto_keyframe,
 									autogrouptype);
+								delete dummy;
 							}
 							break;
 
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/tracksedit.C hvirtual-2.1/cinelerra/tracksedit.C
--- hvirtual-svn/cinelerra/tracksedit.C	2007-02-10 12:52:58.000000000 +0100
+++ hvirtual-2.1/cinelerra/tracksedit.C	2007-02-10 12:50:26.000000000 +0100
@@ -280,7 +280,7 @@
 					Edit *dest_edit = dest_track->edits->shift(position_i, 
 						source_length);
 					Edit *result = dest_track->edits->insert_before(dest_edit, 
-						new Edit(edl, dest_track));
+						dest_track->edits->create_edit());
 					result->copy_from(source_edit);
 					result->startproject = position_i;
 					result->length = source_length;
@@ -316,7 +316,7 @@
 				// ONLY edit is moved, all other edits stay where they are
 				{
 					// Copy edit to temp, delete the edit, insert the edit
-					Edit *temp_edit = new Edit(edl, dest_track); 
+					Edit *temp_edit = dest_track->edits->create_edit(); 
 					temp_edit->copy_from(source_edit);
 					// we call the edits directly since we do not want to move keyframes or anything else
 					source_track->edits->clear(source_startproject, 
@@ -328,7 +328,7 @@
 						position_i + source_length);
 					Edit *dest_edit = dest_track->edits->shift(position_i,  source_length);
 					Edit *result = dest_track->edits->insert_before(dest_edit, 
-						new Edit(edl, dest_track));
+						dest_track->edits->create_edit());
 					result->copy_from(temp_edit);
 					result->startproject = position_i;
 					result->length = source_length;
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/module.C hvirtual-2.1/cinelerra/module.C
--- hvirtual-svn/cinelerra/module.C	2006-10-12 12:09:08.000000000 +0200
+++ hvirtual-2.1/cinelerra/module.C	2007-02-10 12:13:25.000000000 +0100
@@ -237,13 +237,18 @@
 
 // If the current transition differs from the previous transition, delete the
 // server.
-	if ((transition && 
-		transition_server && 
-		strcmp(transition->title, transition_server->plugin->title)))
+	if (transition && 
+		transition_server)
 	{
-		transition_server->close_plugin();
-		delete transition_server;
-		transition_server = 0;
+		if (strcmp(transition->title, transition_server->plugin->title))
+		{
+			transition_server->close_plugin();
+			delete transition_server;
+			transition_server = 0;
+		} else
+		{
+			transition_server->plugin = transition;
+		}
 	}
 
 	if(transition && !transition_server)

Reply via email to