/*
* CINELERRA
* Copyright (C) 1997-2012 Adam Williams <broadcast at earthling dot net>
+ * 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
//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)) {
else
result = 1;
if( !result ) {
- asset->actual_width = asset->width;
- asset->actual_height = asset->height;
+ asset->actual_width = asset->width;
+ asset->actual_height = asset->height;
int scale = asset->proxy_scale;
- if( !scale ) scale = 1;
- asset->width = asset->actual_width * scale;
- asset->height = asset->actual_height * 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;