From: Antonio Ospite Date: Wed, 28 Feb 2018 12:25:07 +0000 (+0100) Subject: am7xxx-play: remove useless call to avcodec_close() in video_output_init() X-Git-Tag: v0.1.7~10 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/a648584dd366450bc62a820541338fa40e93069e?ds=inline am7xxx-play: remove useless call to avcodec_close() in video_output_init() If the code reaches the "cleanup" exit path in video_output_init() the output codec context was never opened, so there is no need to close it. --- diff --git a/examples/am7xxx-play.c b/examples/am7xxx-play.c index b43adc6..88d398a 100644 --- a/examples/am7xxx-play.c +++ b/examples/am7xxx-play.c @@ -266,7 +266,6 @@ static int video_output_init(struct video_output_ctx *output_ctx, goto out; cleanup: - avcodec_close(output_codec_ctx); avcodec_free_context(&output_codec_ctx); out: return ret;