Bug 828917: move critsect to cover thread existence test (upstream issue 1465) r=derf

This commit is contained in:
Randell Jesup 2013-03-06 13:40:39 -05:00
parent baf5706d9f
commit 2dd48de2b5

View File

@ -292,12 +292,13 @@ bool IncomingVideoStream::IncomingVideoStreamThreadFun(void* obj) {
bool IncomingVideoStream::IncomingVideoStreamProcess() {
if (kEventError != deliver_buffer_event_.Wait(KEventMaxWaitTimeMs)) {
thread_critsect_.Enter();
if (incoming_render_thread_ == NULL) {
// Terminating
thread_critsect_.Leave();
return false;
}
thread_critsect_.Enter();
I420VideoFrame* frame_to_render = NULL;
// Get a new frame to render and the time for the frame after this one.