mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-05-01 06:13:08 +08:00
avdevice/v4l2: fix mmap_free() skipping first buffer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user