~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0039-vf_scale-don-t-leak-SWS-context.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
5
 
 
6
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
7
(cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa)
 
8
 
 
9
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
10
---
 
11
 libavfilter/vf_scale.c |    2 ++
 
12
 1 files changed, 2 insertions(+), 0 deletions(-)
 
13
 
 
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)
 
19
 
 
20
     scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
 
21
 
 
22
+    if (scale->sws)
 
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);
 
27
-- 
 
28
1.7.4.1
 
29