X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fproxy.C;h=fff64f37fb1eb850e8df5505f818f3abc4bcc871;hb=166867a58d74619aa11aeb562a994cc364d62231;hp=fbb34fcfc4061e767bb63c8fe0734be1bee07f8f;hpb=caf23b6b8e0024c33390ddaa165e11956e66f1c2;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/proxy.C b/cinelerra-5.1/cinelerra/proxy.C index fbb34fcf..fff64f37 100644 --- a/cinelerra-5.1/cinelerra/proxy.C +++ b/cinelerra-5.1/cinelerra/proxy.C @@ -229,11 +229,11 @@ void ProxyRender::to_proxy_path(char *new_path, Indexable *indexable, int scale) //printf("ProxyRender::to_proxy_path %d %s %s\n", __LINE__, new_path), asset->path); } -int ProxyRender::from_proxy_path(char *new_path, Indexable *indexable, int scale) +int ProxyRender::from_proxy_path(char *new_path, Asset *asset, int scale) { char prxy[BCTEXTLEN]; int n = sprintf(prxy, ".proxy%d", scale); - strcpy(new_path, indexable->path); + strcpy(new_path, asset->path); char *ptr = strstr(new_path, prxy); if( !ptr || (ptr[n] != '-' && ptr[n] != '.') ) return 1; // remove proxy, path.proxy#-sfx.ext => path.sfx @@ -242,6 +242,12 @@ int ProxyRender::from_proxy_path(char *new_path, Indexable *indexable, int scale char *cp = ptr + n; for( *cp='.'; cpproxy_edl ) { + if( (cp = strrchr(new_path, '/')) != 0 ) { + for( ptr=new_path; *++cp; ) *ptr++ = *cp; + *ptr = 0; + } + } return 0; } @@ -307,6 +313,7 @@ Asset *ProxyRender::add_original(Indexable *idxbl, int new_scale) proxy->video_length = video_frames; } proxy->folder_no = AW_PROXY_FOLDER; + proxy->proxy_edl = !idxbl->is_asset ? 1 : 0; proxy->audio_data = 0; proxy->video_data = 1; proxy->layers = 1; @@ -650,7 +657,8 @@ ProxyClient::ProxyClient(MWindow *mwindow, ProxyClient::~ProxyClient() { delete render_engine; - delete video_cache; + if( video_cache ) + video_cache->remove_user(); delete src_file; }