From: Steinar H. Gunderson Date: Mon, 16 Nov 2015 22:56:27 +0000 (+0100) Subject: Small cleanup. X-Git-Tag: 0.4~42 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=73f15e0a1d8f66bf3fe4947894ed7c7f00acb6fb;p=bmusb Small cleanup. --- diff --git a/bmusb.cpp b/bmusb.cpp index 7e0864e..4621e4b 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -166,8 +166,10 @@ void BMUSBCapture::dequeue_thread_func() if (uint16_less_than_with_wraparound(video_timecode, audio_timecode)) { printf("Video block 0x%04x without corresponding audio block, dropping.\n", video_timecode); - video_frame_allocator->release_frame(pending_video_frames.front().frame); + QueuedFrame video_frame = pending_video_frames.front(); pending_video_frames.pop_front(); + lock.unlock(); + video_frame_allocator->release_frame(video_frame.frame); } else if (uint16_less_than_with_wraparound(audio_timecode, video_timecode)) { printf("Audio block 0x%04x without corresponding video block, sending blank frame.\n", audio_timecode);