From c4c4c4bf1b4431fb4f013085e8ac07d454861ede Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Mon, 14 Nov 2022 07:04:30 +0300
Subject: [PATCH 2/2] EXPERIMENTAL fix speed of normal video playback

---
 cinelerra-5.1/cinelerra/cache.C | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/cache.C b/cinelerra-5.1/cinelerra/cache.C
index 7c640d9e..cf352282 100644
--- a/cinelerra-5.1/cinelerra/cache.C
+++ b/cinelerra-5.1/cinelerra/cache.C
@@ -117,14 +117,16 @@ File* CICache::check_out(Asset *asset, EDL *edl, int block)
 
 // cache deleted during checkout, destroy this
 	if( users == 1 ) {
-		current->Garbage::remove_user();
+		remove_user();
 		total_lock->unlock();
 		return 0;
 	}
 
 	//printf("users: %i \n", users );
+	EDL *parent = edl->parent_edl;
+	if(parent)
+	remove_user();
 	
-	current->Garbage::remove_user();
 	total_lock->unlock();
 //printf("check out %p %lx %s\n", current, tid, asset->path);
 	return current ? current->file : 0;
-- 
2.30.4

