Skip to content

Commit

Permalink
[media] s2255drv: fix payload size for JPG, MJPEG
Browse files Browse the repository at this point in the history
length is the size of the buffer, not the payload. That's set using
vb2_set_plane_payload().

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Cc: <stable@vger.kernel.org>      # for v3.15 and up
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
sensoray-dev authored and Mauro Carvalho Chehab committed Nov 21, 2014
1 parent 9661975 commit 1f39121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/s2255/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc,
break;
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_MJPEG:
buf->vb.v4l2_buf.length = jpgsize;
vb2_set_plane_payload(&buf->vb, 0, jpgsize);
memcpy(vbuf, tmpbuf, jpgsize);
break;
case V4L2_PIX_FMT_YUV422P:
Expand Down

0 comments on commit 1f39121

Please sign in to comment.