diff --git a/src/examples/export-sink.c b/src/examples/export-sink.c index ffdb0e19c..2a9b34bed 100644 --- a/src/examples/export-sink.c +++ b/src/examples/export-sink.c @@ -408,7 +408,7 @@ static int impl_node_process_input(void *data) SDL_RenderPresent(d->renderer); if (map) - munmap(map, buf->datas[0].maxsize); + munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset); handle_events(d); diff --git a/src/examples/local-v4l2.c b/src/examples/local-v4l2.c index 512cd2b85..79b340b9f 100644 --- a/src/examples/local-v4l2.c +++ b/src/examples/local-v4l2.c @@ -389,7 +389,7 @@ static int impl_node_process_input(void *data) SDL_RenderPresent(d->renderer); if (map) - munmap(map, buf->datas[0].maxsize); + munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset); handle_events(d); diff --git a/src/examples/video-play.c b/src/examples/video-play.c index 430bd7736..5e8c5206b 100644 --- a/src/examples/video-play.c +++ b/src/examples/video-play.c @@ -142,7 +142,7 @@ on_stream_new_buffer(void *_data, uint32_t id) SDL_RenderPresent(data->renderer); if (map) - munmap(map, buf->datas[0].maxsize); + munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset); pw_stream_recycle_buffer(stream, id);