Commit 9b955eec authored by Jun Zhao's avatar Jun Zhao Committed by 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: 's avatarJun Zhao <jun.zhao@intel.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6e80079a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment