Skip to content

Commit

Permalink
fixup! media: rkvdec: Fix .buf_prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwiboo authored and sigmaris committed Aug 8, 2020
1 parent 6b8605e commit bbee490
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/staging/media/rkvdec/rkvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,13 +606,11 @@ static int rkvdec_buf_prepare(struct vb2_buffer *vb)
}

/*
* Buffer's bytesused is written by the driver for CAPTURE buffers,
* or if the application passed zero bytesused on an OUTPUT buffer.
* Buffer's bytesused is written by the driver for CAPTURE buffers.
*/
if (!V4L2_TYPE_IS_OUTPUT(vq->type) ||
(V4L2_TYPE_IS_OUTPUT(vq->type) && !vb2_get_plane_payload(vb, 0)))
vb2_set_plane_payload(vb, 0,
f->fmt.pix_mp.plane_fmt[0].sizeimage);
if (!V4L2_TYPE_IS_OUTPUT(vq->type))
vb2_set_plane_payload(vb, 0, f->fmt.pix_mp.plane_fmt[0].sizeimage);

return 0;
}

Expand Down

0 comments on commit bbee490

Please sign in to comment.