From 04675319996bc15824613ea2c96972be06dbecfa Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 17 Jan 2007 10:26:13 +0000 Subject: [PATCH] fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.ogm and http://sam.zoy.org/zzuf/lol-ffplay.ogg Originally committed as revision 7561 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index ce1a05ce4b..adcfd04812 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -672,6 +672,8 @@ struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, void sws_freeContext(struct SwsContext *ctx) { + if (!ctx) + return; if ((ctx->resampling_ctx->iwidth != ctx->resampling_ctx->owidth) || (ctx->resampling_ctx->iheight != ctx->resampling_ctx->oheight)) { img_resample_close(ctx->resampling_ctx);