v4l2-linux: Fix nv12 linesize

unlike other YUV based formats nv12 chroma plane has the same padding as
the luma plane.
ref: https://01.org/linuxgraphics/gfx-docs/drm/media/uapi/v4l/pixfmt-nv12.html
master
Kurt Kartaltepe 2020-09-26 13:18:06 -07:00 committed by Jim
parent e5d8f345fc
commit 0cad2abbbe
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ static void v4l2_prep_obs_frame(struct v4l2_data *data,
switch (data->pixfmt) {
case V4L2_PIX_FMT_NV12:
frame->linesize[0] = data->linesize;
frame->linesize[1] = data->linesize / 2;
frame->linesize[1] = data->linesize;
plane_offsets[1] = data->linesize * data->height;
break;
case V4L2_PIX_FMT_YVU420: