You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
avcodec/cook: use av_freep()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@ -228,7 +228,7 @@ static av_cold int init_cook_mlt(COOKContext *q)
|
|||||||
|
|
||||||
/* Initialize the MDCT. */
|
/* Initialize the MDCT. */
|
||||||
if ((ret = ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size) + 1, 1, 1.0 / 32768.0))) {
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
av_log(q->avctx, AV_LOG_DEBUG, "MDCT initialized, order = %d.\n",
|
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");
|
av_log(avctx, AV_LOG_DEBUG, "Deallocating memory.\n");
|
||||||
|
|
||||||
/* Free allocated memory buffers. */
|
/* Free allocated memory buffers. */
|
||||||
av_free(q->mlt_window);
|
av_freep(&q->mlt_window);
|
||||||
av_free(q->decoded_bytes_buffer);
|
av_freep(&q->decoded_bytes_buffer);
|
||||||
|
|
||||||
/* Free the transform. */
|
/* Free the transform. */
|
||||||
ff_mdct_end(&q->mdct_ctx);
|
ff_mdct_end(&q->mdct_ctx);
|
||||||
|
Reference in New Issue
Block a user