lib: fix stream 0 data allocation size

This commit is contained in:
Steve Markgraf 2026-02-18 00:46:19 +01:00
parent 56332176b3
commit 0b97a7569c

View file

@ -803,7 +803,7 @@ static void hsdaoh_process_frame(hsdaoh_dev_t *dev, uint8_t *data, int size)
int frame_errors = 0;
unsigned int stream0_payload_bytes = 0;
uint16_t stream0_format = 0;
uint8_t *stream0_data = malloc(dev->width-1 * dev->height * 2);
uint8_t *stream0_data = malloc(dev->width * dev->height * sizeof(uint16_t));
if (!stream0_data) {
fprintf(stderr, "Out of memory, frame skipped!\n");