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

Michael Bradshaw mbradshaw at sorensonmedia.com
Fri Nov 18 22:59:45 CET 2011


On Thu, Nov 17, 2011 at 6:32 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Applied.


More information about the ffmpeg-devel mailing list