X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffilelist.C;h=3443a8b408575d867c0442efeab8ded57ccd1df3;hp=f4f26dac22e9479c53b74881780180ad3d3c3dc9;hb=refs%2Fheads%2Fmaster;hpb=cb1a1530246ad67fb9be9aa2dbba5b88eb63e933 diff --git a/cinelerra-5.1/cinelerra/filelist.C b/cinelerra-5.1/cinelerra/filelist.C index f4f26dac..3443a8b4 100644 --- a/cinelerra-5.1/cinelerra/filelist.C +++ b/cinelerra-5.1/cinelerra/filelist.C @@ -2,6 +2,7 @@ /* * CINELERRA * Copyright (C) 1997-2012 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -112,9 +113,10 @@ int FileList::open_file(int rd, int wr) //printf("FileList::open_file %d asset->path=%s\n", __LINE__, asset->path); if(stream) { + int width = asset->width, height = asset->height; char string[BCTEXTLEN]; int len = strlen(list_prefix); - int ret = fread(string, 1, strlen(list_prefix), stream); + int ret = fread(string, 1, len, stream); fclose(stream); result = len == ret ? 0 : 1; if( !result && !strncasecmp(string, list_prefix, len)) { @@ -131,12 +133,17 @@ int FileList::open_file(int rd, int wr) else result = 1; if( !result ) { - int width = asset->width; - int height = asset->height; - asset->actual_width = asset->width; - if( width ) asset->width = width; - asset->actual_height = asset->height; - if( height ) asset->height = height; + asset->actual_width = asset->width; + asset->actual_height = asset->height; + int scale = asset->proxy_scale; + if( scale ) { + asset->width = asset->actual_width * scale; + asset->height = asset->actual_height * scale; + } + else { // can_scale_input + if( width ) asset->width = width; + if( height ) asset->height = height; + } asset->layers = 1; if( !asset->frame_rate ) asset->frame_rate = 10;