From 73f15e0a1d8f66bf3fe4947894ed7c7f00acb6fb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 16 Nov 2015 23:56:27 +0100 Subject: [PATCH] Small cleanup. --- bmusb.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.2