From: Steinar H. Gunderson Date: Mon, 16 Nov 2015 21:46:45 +0000 (+0100) Subject: Add an extra byte of headroom to the buffer so that overlong frames are not treated... X-Git-Tag: 1.0.0~112 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f4652550f7952d935640ca97bcd7bdbaa9820762;p=nageru Add an extra byte of headroom to the buffer so that overlong frames are not treated as correct ones. --- 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(