mirror of
https://github.com/steve-m/hsdaoh.git
synced 2026-03-14 21:09:44 +01:00
lib: fix stream 0 data allocation size
This commit is contained in:
parent
56332176b3
commit
0b97a7569c
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue