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 a0908b1 commit 75284f7Copy full SHA for 75284f7
samples/drivers/video/tcpserversink/src/main.c
@@ -334,7 +334,10 @@ int main(void)
334
335
/* Size to allocate for each buffer */
336
if (caps.min_line_count == LINE_COUNT_HEIGHT) {
337
- bsize = fmt.pitch * fmt.height;
+ if (fmt.pixelformat == VIDEO_PIX_FMT_NV12)
338
+ bsize = fmt.width * fmt.height * 3 / 2;
339
+ else
340
+ bsize = fmt.pitch * fmt.height;
341
} else {
342
bsize = fmt.pitch * caps.min_line_count;
343
}
0 commit comments