From faf8d3ddfa105d7f107a886c5f3cadf6357d89b6 Mon Sep 17 00:00:00 2001
From: "Ronald S. Bultje" <rsbultje@gmail.com>
Date: Fri, 27 May 2011 11:57:39 -0400
Subject: [PATCH] cmdutils: use sws_freeContext() instead of av_freep().

av_freep(swsContext) will leak all memory potentially
allocated within the swsContext.
---
 cmdutils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index feeea694d81..778f0fb3cf5 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -76,7 +76,8 @@ void uninit_opts(void)
     av_freep(&avformat_opts->key);
     av_freep(&avformat_opts);
 #if CONFIG_SWSCALE
-    av_freep(&sws_opts);
+    sws_freeContext(sws_opts);
+    sws_opts = NULL;
 #endif
     for (i = 0; i < opt_name_count; i++) {
         //opt_values are only stored for codec-specific options in which case
-- 
GitLab