[FFmpeg-devel] [PATCH] libavfilter/vf_cover_rect.c: free the allocated frame
Michael Niedermayer
michael at niedermayer.cc
Fri Jun 7 18:13:33 EEST 2019
On Thu, Jun 06, 2019 at 04:30:56PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavfilter/vf_cover_rect.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c
> index 41cd1a12b9..d63c03215d 100644
> --- a/libavfilter/vf_cover_rect.c
> +++ b/libavfilter/vf_cover_rect.c
> @@ -196,8 +196,10 @@ static av_cold void uninit(AVFilterContext *ctx)
> {
> CoverContext *cover = ctx->priv;
>
> - if (cover->cover_frame)
> + if (cover->cover_frame) {
> av_freep(&cover->cover_frame->data[0]);
> + av_frame_free(&cover->cover_frame);
the AVFrame should be setup in such a way that a av_frame_free() alone is
enough and explicit no av_freep of data is needed
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190607/8aaf38b4/attachment.sig>
More information about the ffmpeg-devel
mailing list