From 0318f33479c855200b1d5c62597a0bd53cab8849 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 26 Sep 2018 05:21:44 +0300 Subject: [PATCH] increased max buffer size --- src/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index fca871d..9798066 100644 --- a/src/device.c +++ b/src/device.c @@ -409,9 +409,9 @@ static void _device_open_alloc_picbufs(struct device_t *dev) { LOG_DEBUG("Allocating picture buffers ..."); A_CALLOC(dev->run->pictures, dev->run->n_buffers); - dev->run->max_picture_size = (dev->run->width * dev->run->height) << 1; + dev->run->max_picture_size = ((dev->run->width * dev->run->height) << 1) * 2; for (unsigned index = 0; index < dev->run->n_buffers; ++index) { - LOG_DEBUG("Allocating picture buffer %d ...", index); + LOG_DEBUG("Allocating picture buffer %d sized %lu bytes... ", index, dev->run->max_picture_size); A_CALLOC(dev->run->pictures[index].data, dev->run->max_picture_size); dev->run->pictures[index].allocated = dev->run->max_picture_size; }