From: Jun Zhao <barryjz...@tencent.com>

sws_freeContext have check the NULL pointer, so don't need to check
NULL before sws_freeContext.

Signed-off-by: Jun Zhao <barryjz...@tencent.com>
---
 libavfilter/vf_sr.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index a371e44..0be572f 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -286,9 +286,7 @@ static av_cold void uninit(AVFilterContext *context)
     }
 
     for (i = 0; i < 3; ++i){
-        if (sr_context->sws_contexts[i]){
-            sws_freeContext(sr_context->sws_contexts[i]);
-        }
+        sws_freeContext(sr_context->sws_contexts[i]);
     }
 }
 
-- 
1.7.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to