X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=4dc1ce2853d26250839170642f34ea931616dd1a;hb=85a4302e7031b0285aeb9559aa6dbc531db6e443;hp=3960340ac93f0b0638712d698af52633509e2aa4;hpb=b75d1938e1d08c7f3ac49b19bb69bbeec5053aab;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 3960340a..4dc1ce28 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -128,7 +128,7 @@ VFrame *AssetVIcon::frame() AssetVIconThread *avt = picon->gui->vicon_thread; Indexable *idxbl = picon->indexable; Asset *asset = idxbl && idxbl->is_asset ? (Asset *)idxbl : 0; - if( !asset ) return vframes()>0 ? (VFrame*)*images[0] : 0; + if( !asset ) return vframes()>0 ? images[0]->vfrm : 0; if( !asset->video_data && audio_data && audio_size && length > 0 ) { if( !temp ) temp = new VFrame(0, -1, w, h, BC_RGB888, -1); temp->clear_frame(); @@ -174,15 +174,17 @@ VFrame *AssetVIcon::frame() File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1); if( !file ) { broken = 1; return 0; } Timer timer; - while( file && seq_no >= images.size() && !avt->interrupted ) { + while( file && seq_no >= images.size() ) { int64_t pos = images.size() / picon->gui->vicon_thread->refresh_rate * frame_rate; file->set_video_position(pos,0); file->set_layer(0); if( file->read_frame(temp) ) temp->clear_frame(); add_image(temp, vw, vh, vicon_cmodel); + if( seq_no < images.size() ) break; mwindow->video_cache->check_in(asset); if( timer.get_difference() > 500 ) return 0; Thread::yield(); + if( avt->interrupted ) return 0; file = mwindow->video_cache->check_out(asset, mwindow->edl, 0); for( int retries=10; !file && --retries>=0; usleep(1000) ) { if( avt->interrupted ) return 0; @@ -193,7 +195,7 @@ VFrame *AssetVIcon::frame() mwindow->video_cache->check_in(asset); } if( seq_no >= images.size() ) return 0; - return *images[seq_no]; + return images[seq_no]->vfrm; } int64_t AssetVIcon::set_seq_no(int64_t no) @@ -2879,6 +2881,18 @@ int AWindowAssets::selection_changed() deactivate_selection(); } + else if( get_button_down() && get_buttonpress() == LEFT_BUTTON && + get_double_click() ) { + item = (AssetPicon*)get_selection(0, 0); + if( item ) { + switch( folder ) { + case AW_LABEL_FOLDER: + if( !item->label ) break; + mwindow->set_position(item->label->position); + break; + } + } + } else if( get_button_down() && !gui->play_off && mwindow->edl->session->assetlist_format != ASSETS_TEXT ) { item = (AssetPicon*)get_selection(0, 0);