From f4652550f7952d935640ca97bcd7bdbaa9820762 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 16 Nov 2015 22:46:45 +0100 Subject: [PATCH] Add an extra byte of headroom to the buffer so that overlong frames are not treated as correct ones. --- mixer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mixer.cpp b/mixer.cpp index 936a070..db5980d 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -107,7 +107,7 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) CaptureCard *card = &cards[card_index]; card->usb = new BMUSBCapture(card_index); card->usb->set_frame_callback(bind(&Mixer::bm_frame, this, card_index, _1, _2, _3, _4, _5, _6, _7)); - card->frame_allocator.reset(new PBOFrameAllocator(WIDTH * (HEIGHT+EXTRAHEIGHT) * 2 + 44, WIDTH, HEIGHT)); + card->frame_allocator.reset(new PBOFrameAllocator(WIDTH * (HEIGHT+EXTRAHEIGHT) * 2 + 44 + 1, WIDTH, HEIGHT)); card->usb->set_video_frame_allocator(card->frame_allocator.get()); card->surface = create_surface(format); card->usb->set_dequeue_thread_callbacks( -- 2.39.2