X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffilelist.C;h=dd78cf5726deeeb9924fb46b968bee5a70f40878;hb=b2eb290b3f6e5c233393017aa152e67c76243130;hp=b98864f98fcb1ca2ce2561f33a9ce31e1982b23f;hpb=9a91a25bfcf0a01f410f2a27584c8a6c524d37d1;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/filelist.C b/cinelerra-5.1/cinelerra/filelist.C index b98864f9..dd78cf57 100644 --- a/cinelerra-5.1/cinelerra/filelist.C +++ b/cinelerra-5.1/cinelerra/filelist.C @@ -132,9 +132,15 @@ int FileList::open_file(int rd, int wr) //printf("FileList::open_file 2\n", asset->use_header); //printf("FileList::open_file %d\n", __LINE__); asset->format = frame_type; + int width = asset->width; + int height = asset->height; result = read_frame_header(asset->path); + asset->actual_width = asset->width; + if( width ) asset->width = width; + asset->actual_height = asset->height; + if( height ) asset->height = height; asset->layers = 1; - if(!asset->frame_rate) + if( !asset->frame_rate ) asset->frame_rate = 1; asset->video_length = -1; } @@ -371,7 +377,7 @@ int FileList::read_frame(VFrame *frame) data->allocate_compressed_data(ostat.st_size); data->set_compressed_size(ostat.st_size); (void)fread(data->get_data(), ostat.st_size, 1, fd); - temp = new VFrame(asset->width, asset->height, + temp = new VFrame(asset->actual_width, asset->actual_height, frame->get_color_model(), 0); read_frame(temp, data); break; @@ -387,7 +393,8 @@ int FileList::read_frame(VFrame *frame) } else { - temp = new VFrame(asset->width, asset->height, frame->get_color_model(), 0); + temp = new VFrame(asset->actual_width, asset->actual_height, + frame->get_color_model(), 0); read_frame(temp, asset->path); } }