From 9b4b6e099b8892127bfb3e6560a6eecbb72c2833 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 25 Oct 2003 19:30:14 +0000 Subject: [PATCH] segfault fix Originally committed as revision 2434 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegvideo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 35ee649573..e95dca06fa 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -585,8 +585,10 @@ void MPV_common_end(MpegEncContext *s) av_freep(&s->input_picture); av_freep(&s->reordered_input_picture); - for(i=0; ipicture[i]); + if(s->picture){ + for(i=0; ipicture[i]); + } } av_freep(&s->picture); avcodec_default_free_buffers(s->avctx);