Re: [FFmpeg-devel] [PATCH 3/9] lavd/v4l2: reduce variable scope

2021-11-26 Thread Andreas Rheinhardt
Anton Khirnov: > device and cap are local to the loop iteration, there is no need for > them to retain their values. Especially for device it may be dangerous, > since it points to av_malloc'ed data. > --- > libavdevice/v4l2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff -

[FFmpeg-devel] [PATCH 3/9] lavd/v4l2: reduce variable scope

2021-11-25 Thread Anton Khirnov
device and cap are local to the loop iteration, there is no need for them to retain their values. Especially for device it may be dangerous, since it points to av_malloc'ed data. --- libavdevice/v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/v4l2.c b/lib