From d8d915dba254dee5381c82788074f4374293f45a Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 12 Oct 2015 22:10:48 +0200 Subject: [PATCH] Be less verbose on overflow. --- bmusb | 2 +- pbo_frame_allocator.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bmusb b/bmusb index 76d4286..f38bf2b 160000 --- a/bmusb +++ b/bmusb @@ -1 +1 @@ -Subproject commit 76d42863dafcc8ab3b60df73c0caae9f98545a2a +Subproject commit f38bf2bef09e52ba1e15678f5688132f282b50c2 diff --git a/pbo_frame_allocator.cpp b/pbo_frame_allocator.cpp index 15fcb61..204bb94 100644 --- a/pbo_frame_allocator.cpp +++ b/pbo_frame_allocator.cpp @@ -103,11 +103,16 @@ FrameAllocator::Frame PBOFrameAllocator::alloc_frame() freelist.pop(); // Meh. } vf.len = 0; + vf.overflow = 0; return vf; } void PBOFrameAllocator::release_frame(Frame frame) { + if (frame.overflow > 0) { + printf("%d bytes overflow after last (PBO) frame\n", int(frame.overflow)); + } + std::unique_lock lock(freelist_mutex); freelist.push(frame); //--sumsum; -- 2.39.2