aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-17 01:46:22 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-17 01:46:22 +0100
commit2b27f7fb04c54cf12ac6773bee19d2a4ebbdb64f (patch)
tree37c2b171b7ce4758d21a1bfb78f02d6021f2ee8d
parentf7ab23b0d0a8b72a62bd9386a1e48ccc2cf47576 (diff)
downloadffmpeg-2b27f7fb04c54cf12ac6773bee19d2a4ebbdb64f.tar.gz
lavfi/thumbnail: replace frame unref with free.
Fixes memleak spotted by FATE.
-rw-r--r--libavfilter/vf_thumbnail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c
index 46ab834f4a..b62bef6a0a 100644
--- a/libavfilter/vf_thumbnail.c
+++ b/libavfilter/vf_thumbnail.c
@@ -113,7 +113,7 @@ static AVFrame *get_best_frame(AVFilterContext *ctx)
for (i = 0; i < nb_frames; i++) {
memset(thumb->frames[i].histogram, 0, sizeof(thumb->frames[i].histogram));
if (i != best_frame_idx)
- av_frame_unref(thumb->frames[i].buf);
+ av_frame_free(&thumb->frames[i].buf);
}
thumb->n = 0;
@@ -162,7 +162,7 @@ static av_cold void uninit(AVFilterContext *ctx)
int i;
ThumbContext *thumb = ctx->priv;
for (i = 0; i < thumb->n_frames && thumb->frames[i].buf; i++)
- av_frame_unref(thumb->frames[i].buf);
+ av_frame_free(&thumb->frames[i].buf);
av_freep(&thumb->frames);
}