[FFmpeg-cvslog] lavf/sr: Don't need to check NULL before sws_freeContext

Jun Zhao git at videolan.org
Mon Jun 3 08:14:06 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Sat Jun  1 11:25:46 2019 +0800| [5c1fbc42397b26fe77abbd7e2ae604d57274ac35] | committer: Jun Zhao

lavf/sr: Don't need to check NULL before sws_freeContext

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

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c1fbc42397b26fe77abbd7e2ae604d57274ac35
---

 libavfilter/vf_sr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index a371e443d4..0be572ff9d 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]);
     }
 }
 



More information about the ffmpeg-cvslog mailing list