Add mplanes to mp_camera_release_buffer

This commit is contained in:
Yassine Oudjana 2022-01-15 15:18:42 +04:00
parent 868291e0c6
commit b980eb5aea
1 changed files with 7 additions and 0 deletions

View File

@ -771,6 +771,13 @@ mp_camera_release_buffer(MPCamera *camera, uint32_t buffer_index)
buf.type = buftype;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = buffer_index;
struct v4l2_plane planes[1];
if (camera->use_mplane) {
buf.m.planes = planes;
buf.length = 1;
}
if (xioctl(camera->video_fd, VIDIOC_QBUF, &buf) == -1) {
errno_printerr("VIDIOC_QBUF");
return false;