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

Stefano Sabatini stefasab at gmail.com
Sun Feb 3 11:44:35 CET 2013


On date Saturday 2013-02-02 22:03:20 +0100, Marton Balint encoded:
> 
> On Sat, 2 Feb 2013, Stefano Sabatini wrote:
> 
> >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);
> >}
> 
> LGTM, thanks.

Applied.
-- 
FFmpeg = Fantastic and Frightening Monstrous Programmable Enlightened God


More information about the ffmpeg-devel mailing list