X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvedit.C;h=775822fe5a0976201d0a6f2ce97ce6de3b98151a;hb=4b6c39e6cf4a3fd9c1b347db6de686ab55d6cac8;hp=7f0115b08993cf14ccbe92cb02e6590a5f186d2c;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vedit.C b/cinelerra-5.1/cinelerra/vedit.C index 7f0115b0..775822fe 100644 --- a/cinelerra-5.1/cinelerra/vedit.C +++ b/cinelerra-5.1/cinelerra/vedit.C @@ -129,6 +129,8 @@ int VEdit::read_frame(VFrame *video_out, int use_cache, int use_asynchronous) { + File *file = 0; + int result = 0; int64_t source_position = 0; const int debug = 0; @@ -139,20 +141,19 @@ if(debug) printf("VEdit::read_frame %d source_position=%jd input_position=%jd\n" Asset *asset = get_nested_asset(&source_position, input_position, direction); + if( !asset ) result = 1; if(debug) printf("VEdit::read_frame %d source_position=%jd input_position=%jd\n", __LINE__, source_position, input_position); - File *file = cache->check_out(asset, - edl); - int result = 0; - + if( !result ) { + file = cache->check_out(asset, edl); + if( !file ) result = 1; + } if(debug) printf("VEdit::read_frame %d path=%s source_position=%jd\n", __LINE__, asset->path, source_position); - if(file) - { - + if( !result ) { if(debug) printf("VEdit::read_frame %d\n", __LINE__); source_position = (direction == PLAY_FORWARD) ? source_position : @@ -179,8 +180,6 @@ if(debug) printf("VEdit::read_frame %d\n", __LINE__); cache->check_in(asset); if(debug) printf("VEdit::read_frame %d\n", __LINE__); } - else - result = 1; //for(int i = 0; i < video_out->get_w() * 3 * 20; i++) video_out->get_rows()[0][i] = 128; return result;