This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 603234f945 avdevice/v4l2: fix mmap_free() skipping first buffer
603234f945 is described below
commit 603234f945be3a508ca42b272ff76468168e510d
Author: Zhao Zhili <[email protected]>
AuthorDate: Mon Apr 13 21:16:07 2026 +0800
Commit: Zhao Zhili <[email protected]>
CommitDate: Tue Apr 28 13:45:20 2026 +0000
avdevice/v4l2: fix mmap_free() skipping first buffer
Signed-off-by: Zhao Zhili <[email protected]>
---
libavdevice/v4l2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 28bcc3df2a..2ca093b7b0 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -362,9 +362,8 @@ static void list_standards(AVFormatContext *ctx)
static void mmap_free(struct video_data *s, int n)
{
- while (--n > 0) {
- v4l2_munmap(s->buf_data[n].start, s->buf_data[n].len);
- }
+ for (int i = 0; i < n; i++)
+ v4l2_munmap(s->buf_data[i].start, s->buf_data[i].len);
av_freep(&s->buf_data);
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]