Fix race condition in capture finalization.

This race resulted in the failure to consistently redraw new captures
in the proper color.
This commit is contained in:
Jonathan Moore Liles 2008-07-17 20:58:33 -05:00
parent 221242a27d
commit 7e294df84e
1 changed files with 6 additions and 3 deletions

View File

@ -198,12 +198,15 @@ Record_DS::disk_thread ( void )
DMESSAGE( "finalzing capture" );
/* now finalize the recording */
track()->finalize( _capture, _stop_frame );
Track::Capture *c = _capture;
delete _capture;
_capture = NULL;
/* now finalize the recording */
track()->finalize( c, _stop_frame );
delete c;
_terminate = false;
DMESSAGE( "capture thread gone" );
}