diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-09 07:03:10 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-29 01:30:55 +0200 |
commit | 7d112c638aaa6483a8e6a05d8b79f07092069b45 (patch) | |
tree | dd5e73822e56fde0d223f17cb2c1cbace26eb9b2 /libavcodec/snowenc.c | |
parent | 433925ac4d4a1eb0d2364e81e9f3e51e5d237895 (diff) | |
download | ffmpeg-7d112c638aaa6483a8e6a05d8b79f07092069b45.tar.gz |
avcodec/snow: Move freeing encoder-only buffers to snowenc.c
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index a09f81939d..ab15c4e108 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -2022,6 +2022,17 @@ static av_cold int encode_end(AVCodecContext *avctx) ff_snow_common_end(s); ff_rate_control_uninit(&s->m); av_frame_free(&s->input_picture); + + for (int i = 0; i < MAX_REF_FRAMES; i++) { + av_freep(&s->ref_mvs[i]); + av_freep(&s->ref_scores[i]); + } + + s->m.me.temp = NULL; + av_freep(&s->m.me.scratchpad); + av_freep(&s->m.me.map); + av_freep(&s->m.sc.obmc_scratchpad); + av_freep(&avctx->stats_out); return 0; |