[FFmpeg-devel] [PATCH] ffplay: drop redundant NULL sws_freeContext() check in stream_close()

Stefano Sabatini stefasab at gmail.com
Sat Feb 2 16:42:01 CET 2013


sws_freeContext() already checks for NULL, simplify.
---
 ffplay.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index c1c264f..afb0874 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1000,8 +1000,7 @@ static void stream_close(VideoState *is)
     SDL_DestroyCond(is->subpq_cond);
     SDL_DestroyCond(is->continue_read_thread);
 #if !CONFIG_AVFILTER
-    if (is->img_convert_ctx)
-        sws_freeContext(is->img_convert_ctx);
+    sws_freeContext(is->img_convert_ctx);
 #endif
     av_free(is);
 }
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list