X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fdcaenc.c;h=4b4ceeff05b0a021568bce9f064bd6106f830cea;hb=536bcc30e04a7c0868f226606b81d257bae47318;hp=186997c6311d254a91cf03d87542f87442b452c3;hpb=c00b218a8f75ed3eb87c213d95bd5775c0af5e12;p=ffmpeg diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index 186997c6311..4b4ceeff05b 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -152,8 +152,11 @@ static int subband_bufer_alloc(DCAEncContext *c) static void subband_bufer_free(DCAEncContext *c) { - int32_t *bufer = c->subband[0][0] - DCA_ADPCM_COEFFS; - av_freep(&bufer); + if (c->subband[0][0]) { + int32_t *bufer = c->subband[0][0] - DCA_ADPCM_COEFFS; + av_free(bufer); + c->subband[0][0] = NULL; + } } static int encode_init(AVCodecContext *avctx)