From 7a1686185971a5bcb556efbd6d6e632ebb655dfb Mon Sep 17 00:00:00 2001 From: Luca Abeni Date: Wed, 28 Feb 2007 15:07:35 +0000 Subject: [PATCH] Do not jump to "fail" without having a proper sws context in img_resample_ctx (avoid calling sws_freeContext(NULL)) Originally committed as revision 8162 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index ff33f85d6f..cc8d285e45 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1614,7 +1614,7 @@ static int av_encode(AVFormatContext **output_files, avcodec_get_frame_defaults(&ost->pict_tmp); if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, codec->pix_fmt, codec->width, codec->height ) ) - goto fail; + exit(1); ost->img_resample_ctx = sws_getContext( icodec->width - (frame_leftBand + frame_rightBand),