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>
pull/304/head
Jun Zhao 7 years ago committed by Michael Niedermayer
parent 6e80079a28
commit 9b955eece6
  1. 3
      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;

Loading…
Cancel
Save