[FFmpeg-cvslog] examples/vaapi_encode: Remove redundancy check when free context.
Jun Zhao
git at videolan.org
Fri Jan 12 13:54:05 EET 2018
ffmpeg | branch: master | Jun Zhao <jun.zhao at intel.com> | Thu Jan 11 13:21:58 2018 +0800| [9b955eece610f7f8b4aa2096b4e0ca738e21edc4] | committer: Michael Niedermayer
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>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b955eece610f7f8b4aa2096b4e0ca738e21edc4
---
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);
return err;
More information about the ffmpeg-cvslog
mailing list