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 135cc7f commit 4d9f17bCopy full SHA for 4d9f17b
samples/drivers/video/tcpserversink/src/main.c
@@ -342,7 +342,12 @@ int main(void)
342
343
/* Size to allocate for each buffer */
344
if (caps.min_line_count == LINE_COUNT_HEIGHT) {
345
- bsize = fmt.pitch * fmt.height;
+ if (fmt.pixelformat == VIDEO_PIX_FMT_NV12) {
346
+ bsize = fmt.width * fmt.height *
347
+ video_bits_per_pixel(fmt.pixelformat) / BITS_PER_BYTE;
348
+ } else {
349
+ bsize = fmt.pitch * fmt.height;
350
+ }
351
} else {
352
bsize = fmt.pitch * caps.min_line_count;
353
}
0 commit comments