media: docs: Fix mem_offset name in multiplane example

The v4l2_buffer type has an "offset" field, but the corresponding field
in the v4l2_plane type is called "mem_offset". Use the correct name in
this example.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Matthijs Kooijman 2024-03-14 17:06:07 +01:00 committed by Hans Verkuil
parent b74c77d3d6
commit 655d3eb92c
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ Example: Mapping buffers in the multi-planar API
buffers[i].start[j] = mmap(NULL, buffer.m.planes[j].length,
PROT_READ | PROT_WRITE, /* recommended */
MAP_SHARED, /* recommended */
fd, buffer.m.planes[j].m.offset);
fd, buffer.m.planes[j].m.mem_offset);
if (MAP_FAILED == buffers[i].start[j]) {
/* If you do not exit here you should unmap() and free()