increased max buffer size

This commit is contained in:
Devaev Maxim
2018-09-26 05:21:44 +03:00
parent 892f87bb17
commit 0318f33479

View File

@@ -409,9 +409,9 @@ static void _device_open_alloc_picbufs(struct device_t *dev) {
LOG_DEBUG("Allocating picture buffers ..."); LOG_DEBUG("Allocating picture buffers ...");
A_CALLOC(dev->run->pictures, dev->run->n_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) { 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); A_CALLOC(dev->run->pictures[index].data, dev->run->max_picture_size);
dev->run->pictures[index].allocated = dev->run->max_picture_size; dev->run->pictures[index].allocated = dev->run->max_picture_size;
} }