[FFmpeg-devel] [PATCH 1/2] examples/vaapi_encode: Remove redundancy check when free context.
Michael Niedermayer
michael at niedermayer.cc
Fri Jan 12 13:31:33 EET 2018
On Thu, Jan 11, 2018 at 03:07:18PM +0800, Jun Zhao wrote:
>
> vaapi_encode.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 6002024418a485e89bb71fac812f5c540a434cf5 0001-examples-vaapi_encode-Remove-redundancy-check-when-f.patch
> From ef424745ce8d425859e9ca16dd9aca72297ed90a Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao at intel.com>
> Date: Thu, 11 Jan 2018 13:21:58 +0800
> Subject: [PATCH 1/2] examples/vaapi_encode: Remove redundancy check when free
> context.
>
> avcodec_free_context have handle NULL pointer case, so caller doesn't
> need to check the NULL before call this function.
>
> Signe-off-by: Jun Zhao <jun.zhao at intel.com>
> ---
> doc/examples/vaapi_encode.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/doc/examples/vaapi_encode.c b/doc/examples/vaapi_encode.c
> index f66a4a7c48..6425b1c98c 100644
> --- a/doc/examples/vaapi_encode.c
> +++ b/doc/examples/vaapi_encode.c
> @@ -217,8 +217,7 @@ close:
> fclose(fout);
> av_frame_free(&sw_frame);
> av_frame_free(&hw_frame);
> - if (avctx)
> - avcodec_free_context(&avctx);
> + avcodec_free_context(&avctx);
> av_buffer_unref(&hw_device_ctx);
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Elect your leaders based on what they did after the last election, not
based on what they say before an election.
-------------- 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/20180112/035d93ac/attachment.sig>
More information about the ffmpeg-devel
mailing list