]> git.sesse.net Git - bmusb/commitdiff
Small cleanup.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Nov 2015 22:56:27 +0000 (23:56 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Nov 2015 22:56:27 +0000 (23:56 +0100)
bmusb.cpp

index 7e0864ee514b923a818d9c7956a965d70e9d43a0..4621e4b82880ea50189ecbcb07127205683d417f 100644 (file)
--- 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);