X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.C;h=9f8d93ccc105be9d65c69b57f2e5c2e471f53943;hb=58d99c74e65066486dbebf7e1cb3087e7de1c92b;hp=906fb6e938556377af762768e82dd8cd9428a823;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index 906fb6e9..9f8d93cc 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -76,7 +76,7 @@ VIconThread(BC_WindowBase *wdw, int vw, int vh) timer = new Timer(); this->refresh_rate = VICON_RATE; done = 0; - interrupted = 1; + interrupted = -1; } VIconThread:: @@ -87,8 +87,8 @@ VIconThread:: draw_lock->unlock(); if( Thread::running() ) { Thread::cancel(); - Thread::join(); } + Thread::join(); t_heap.remove_all_objects(); delete timer; delete draw_lock; @@ -100,8 +100,9 @@ start_drawing() wdw->lock_window("VIconThread::start_drawing"); if( view_win ) wdw->set_active_subwindow(view_win); - if( interrupted ) + if( interrupted < 0 ) draw_lock->unlock(); + interrupted = 0; wdw->unlock_window(); } @@ -110,7 +111,8 @@ stop_drawing() { wdw->lock_window("VIconThread::stop_drawing"); set_view_popup(0); - interrupted = 1; + if( !interrupted ) + interrupted = 1; wdw->unlock_window(); } @@ -260,9 +262,8 @@ run() { while(!done) { draw_lock->lock("VIconThread::run 0"); - if( done ) break;; + if( done ) break; wdw->lock_window("BC_WindowBase::run 1"); - interrupted = 0; drawing_started(); reset_images(); int64_t seq_no = 0, now = 0;