We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84476af commit 0bae5f0Copy full SHA for 0bae5f0
samples/drivers/video/tcpserversink/src/main.c
@@ -367,7 +367,12 @@ int main(void)
367
368
/* Size to allocate for each buffer */
369
if (caps.min_line_count == LINE_COUNT_HEIGHT) {
370
- bsize = fmt.pitch * fmt.height;
+ if (fmt.pixelformat == VIDEO_PIX_FMT_NV12) {
371
+ bsize = fmt.width * fmt.height *
372
+ video_bits_per_pixel(fmt.pixelformat) / BITS_PER_BYTE;
373
+ } else {
374
+ bsize = fmt.pitch * fmt.height;
375
+ }
376
} else {
377
bsize = fmt.pitch * caps.min_line_count;
378
}
0 commit comments