Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2020-04-05 08:36:13 +0300
committerAndriy Gelman <andriy.gelman@gmail.com>2020-04-09 04:41:52 +0300
commitcd04bb4afea111aa85afbaf806ae747103a843fd (patch)
tree1b1fc3ebe5bbb7951edcf9750b33d1a587c8ab7f /libavcodec/v4l2_context.c
parent8beb9e571ca6fb38d5f784bedd581398fb3da06f (diff)
avcodec/v4l2_context: Use av_freep()
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavcodec/v4l2_context.c')
-rw-r--r--libavcodec/v4l2_context.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index 8110bbb555..31af10d28e 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -685,8 +685,7 @@ void ff_v4l2_context_release(V4L2Context* ctx)
if (ret)
av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name);
- av_free(ctx->buffers);
- ctx->buffers = NULL;
+ av_freep(&ctx->buffers);
}
int ff_v4l2_context_init(V4L2Context* ctx)
@@ -743,8 +742,7 @@ int ff_v4l2_context_init(V4L2Context* ctx)
error:
v4l2_release_buffers(ctx);
- av_free(ctx->buffers);
- ctx->buffers = NULL;
+ av_freep(&ctx->buffers);
return ret;
}