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 6d23a89 commit edbe3f9Copy full SHA for edbe3f9
samples/drivers/video/tcpserversink/src/main.c
@@ -375,7 +375,12 @@ int main(void)
375
376
/* Size to allocate for each buffer */
377
if (caps.min_line_count == LINE_COUNT_HEIGHT) {
378
- bsize = fmt.pitch * fmt.height;
+ if (fmt.pixelformat == VIDEO_PIX_FMT_NV12) {
379
+ bsize = fmt.width * fmt.height *
380
+ video_bits_per_pixel(fmt.pixelformat) / BITS_PER_BYTE;
381
+ } else {
382
+ bsize = fmt.pitch * fmt.height;
383
+ }
384
} else {
385
bsize = fmt.pitch * caps.min_line_count;
386
}
0 commit comments