diff options
author | Jun Zhao <jun.zhao@intel.com> | 2018-01-11 13:21:58 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-12 12:31:55 +0100 |
commit | 9b955eece610f7f8b4aa2096b4e0ca738e21edc4 (patch) | |
tree | 55da0a5b039e73ad0c997e748df56cf5730faa7e /doc/examples | |
parent | 6e80079a2840ee407c5d126030eb1066bcbfdfc5 (diff) | |
download | ffmpeg-streaming-9b955eece610f7f8b4aa2096b4e0ca738e21edc4.zip ffmpeg-streaming-9b955eece610f7f8b4aa2096b4e0ca738e21edc4.tar.gz |
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@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/vaapi_encode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/doc/examples/vaapi_encode.c b/doc/examples/vaapi_encode.c index f66a4a7..6425b1c 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); return err; |