1
From 2b74db8d2781202742535a466a371a10a108b141 Mon Sep 17 00:00:00 2001
2
From: Michael Niedermayer <michaelni@gmx.at>
3
Date: Wed, 9 Mar 2011 03:30:24 +0100
4
Subject: [PATCH 39/70] vf_scale: don't leak SWS context.
6
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7
(cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa)
9
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11
libavfilter/vf_scale.c | 2 ++
12
1 files changed, 2 insertions(+), 0 deletions(-)
14
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
15
index 65fe01c..5288d32 100644
16
--- a/libavfilter/vf_scale.c
17
+++ b/libavfilter/vf_scale.c
18
@@ -205,6 +205,8 @@ static int config_props(AVFilterLink *outlink)
20
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
23
+ sws_freeContext(scale->sws);
24
scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
25
outlink->w, outlink->h, outlink->format,
26
scale->flags, NULL, NULL, NULL);