summaryrefslogtreecommitdiff
authorPaul B Mahol <onemda@gmail.com>2013-10-29 09:32:19 (GMT)
committer Paul B Mahol <onemda@gmail.com>2013-10-29 09:37:59 (GMT)
commit66518f6feb956407f27148dd4b35be70e58cbb52 (patch)
tree2779a31ae65f27120f8f21d13f60644c26397dc4
parent6bf4edec27de00adac4119a7b8df04d6c0504843 (diff)
downloadffmpeg-66518f6feb956407f27148dd4b35be70e58cbb52.zip
ffmpeg-66518f6feb956407f27148dd4b35be70e58cbb52.tar.gz
ffmpeg-66518f6feb956407f27148dd4b35be70e58cbb52.tar.bz2
avcodec/cook: use av_freep()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat
-rw-r--r--libavcodec/cook.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 083d26b..5b9f34a 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -228,7 +228,7 @@ static av_cold int init_cook_mlt(COOKContext *q)
/* Initialize the MDCT. */
if ((ret = ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size) + 1, 1, 1.0 / 32768.0))) {
- av_free(q->mlt_window);
+ av_freep(&q->mlt_window);
return ret;
}
av_log(q->avctx, AV_LOG_DEBUG, "MDCT initialized, order = %d.\n",
@@ -302,8 +302,8 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
av_log(avctx, AV_LOG_DEBUG, "Deallocating memory.\n");
/* Free allocated memory buffers. */
- av_free(q->mlt_window);
- av_free(q->decoded_bytes_buffer);
+ av_freep(&q->mlt_window);
+ av_freep(&q->decoded_bytes_buffer);
/* Free the transform. */
ff_mdct_end(&q->mdct_ctx);