mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avdevice/v4l2: fix mmap_free() skipping first buffer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
committed by
Zhao Zhili
co-authored by
Zhao Zhili
parent
beb315ca31
commit
603234f945
+2
-3
@@ -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