-// Need temp
- else if( frame->get_color_model() != BC_COMPRESSED &&
- (supported_colormodel != frame->get_color_model() ||
- (!file->can_scale_input() &&
- (frame->get_w() != asset->width ||
- frame->get_h() != asset->height))) ) {
-
-// printf("File::read_frame %d\n", __LINE__);
-// Can't advance position here because it needs to be added to cache
- if( temp_frame ) {
- if( !temp_frame->params_match(asset->width, asset->height, supported_colormodel) ) {
- delete temp_frame;
- temp_frame = 0;
+// Need to read
+ if( do_read ) {
+ VFrame *vframe = frame;
+ if( frame->get_color_model() != BC_COMPRESSED &&
+ (supported_colormodel != frame->get_color_model() ||
+ (!file->can_scale_input() &&
+ (frame->get_w() != asset->width ||
+ frame->get_h() != asset->height))) ) {
+ if( temp_frame ) {
+ if( !temp_frame->params_match(asset->width, asset->height,
+ supported_colormodel) ) {
+ delete temp_frame; temp_frame = 0;
+ }
+ }
+ if( !temp_frame ) {
+ temp_frame = new VFrame(asset->width, asset->height,
+ supported_colormodel, 0);
+ temp_frame->clear_frame();