lavf/sr: Don't need to check NULL before sws_freeContext
authorJun Zhao <barryjzhao@tencent.com>
Sat, 1 Jun 2019 03:25:46 +0000 (11:25 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Mon, 3 Jun 2019 05:04:23 +0000 (13:04 +0800)
sws_freeContext have check the NULL pointer, so don't need to check
NULL before sws_freeContext.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavfilter/vf_sr.c

index a371e44..0be572f 100644 (file)
@@ -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]);
     }
 }