[FFmpeg-devel] [PATCH 5/6] libopenjpegenc: Remove uneeded zeroing after av_freep() as av_freep() already does it.

Michael Niedermayer michaelni at gmx.at
Fri Nov 18 02:32:55 CET 2011


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/libopenjpegenc.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index ad9eb1e..56e7f6c 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -143,7 +143,6 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
     avctx->coded_frame = avcodec_alloc_frame();
     if (!avctx->coded_frame) {
         av_freep(&ctx->compress);
-        ctx->compress = NULL;
         av_log(avctx, AV_LOG_ERROR, "Error allocating coded frame\n");
         return AVERROR(ENOMEM);
     }
@@ -151,9 +150,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
     ctx->image = mj2_create_image(avctx, &ctx->enc_params);
     if (!ctx->image) {
         av_freep(&ctx->compress);
-        ctx->compress = NULL;
         av_freep(&avctx->coded_frame);
-        avctx->coded_frame = NULL;
         av_log(avctx, AV_LOG_ERROR, "Error creating the mj2 image\n");
         return AVERROR(EINVAL);
     }
-- 
1.7.4.1



More information about the ffmpeg-devel mailing list