Commit 5d43303e authored by sensoray-dev's avatar sensoray-dev Committed by Luis Henriques

[media] s2255drv: fix payload size for JPG, MJPEG

commit 1f391217 upstream.

length is the size of the buffer, not the payload. That's set using
vb2_set_plane_payload().
Signed-off-by: default avatarDean Anderson <linux-dev@sensoray.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 3b792fb6
...@@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc, ...@@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc,
break; break;
case V4L2_PIX_FMT_JPEG: case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_MJPEG: case V4L2_PIX_FMT_MJPEG:
buf->vb.v4l2_buf.length = jpgsize; vb2_set_plane_payload(&buf->vb, 0, jpgsize);
memcpy(vbuf, tmpbuf, jpgsize); memcpy(vbuf, tmpbuf, jpgsize);
break; break;
case V4L2_PIX_FMT_YUV422P: case V4L2_PIX_FMT_YUV422P:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment