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 c35d1fb commit 34f0587Copy full SHA for 34f0587
samples/drivers/video/tcpserversink/src/main.c
@@ -340,7 +340,11 @@ int main(void)
340
341
/* Size to allocate for each buffer */
342
if (caps.min_line_count == LINE_COUNT_HEIGHT) {
343
- bsize = fmt.pitch * fmt.height;
+ if (fmt.pixelformat == VIDEO_PIX_FMT_NV12) {
344
+ bsize = fmt.width * fmt.height * 3 / 2;
345
+ } else {
346
+ bsize = fmt.pitch * fmt.height;
347
+ }
348
} else {
349
bsize = fmt.pitch * caps.min_line_count;
350
}
0 commit comments