ffplay: drop redundant NULL sws_freeContext() check in stream_close()
authorStefano Sabatini <stefasab@gmail.com>
Sat, 2 Feb 2013 15:31:57 +0000 (16:31 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Sun, 3 Feb 2013 10:15:27 +0000 (11:15 +0100)
sws_freeContext() already checks for NULL, simplify.

ffplay.c

index efb5468..7e65a17 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -994,8 +994,7 @@ static void stream_close(VideoState *is)
     SDL_DestroyCond(is->subpq_cond);
     SDL_DestroyCond(is->continue_read_thread);
 #if !CONFIG_AVFILTER
     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);
 }
 #endif
     av_free(is);
 }