mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-06 07:10:21 +00:00
avcodec/v4l2_context: Use av_freep()
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
parent
8beb9e571c
commit
cd04bb4afe
@ -685,8 +685,7 @@ void ff_v4l2_context_release(V4L2Context* ctx)
|
|||||||
if (ret)
|
if (ret)
|
||||||
av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name);
|
av_log(logger(ctx), AV_LOG_WARNING, "V4L2 failed to unmap the %s buffers\n", ctx->name);
|
||||||
|
|
||||||
av_free(ctx->buffers);
|
av_freep(&ctx->buffers);
|
||||||
ctx->buffers = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_v4l2_context_init(V4L2Context* ctx)
|
int ff_v4l2_context_init(V4L2Context* ctx)
|
||||||
@ -743,8 +742,7 @@ int ff_v4l2_context_init(V4L2Context* ctx)
|
|||||||
error:
|
error:
|
||||||
v4l2_release_buffers(ctx);
|
v4l2_release_buffers(ctx);
|
||||||
|
|
||||||
av_free(ctx->buffers);
|
av_freep(&ctx->buffers);
|
||||||
ctx->buffers = NULL;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user