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>
This commit is contained in:
Jun Zhao 2018-01-11 13:21:58 +08:00 committed by Michael Niedermayer
parent 6e80079a28
commit 9b955eece6
1 changed files with 1 additions and 2 deletions

View File

@ -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;