diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-10-25 19:30:14 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-25 19:30:14 +0000 |
commit | 9b4b6e099b8892127bfb3e6560a6eecbb72c2833 (patch) | |
tree | 0c3a86b41fad0333aa4994487240002dc55ab4c4 /libavcodec | |
parent | 94fd9201ad09d332ea06b6171f6b1e3b77ae701f (diff) | |
download | ffmpeg-9b4b6e099b8892127bfb3e6560a6eecbb72c2833.tar.gz |
segfault fix
Originally committed as revision 2434 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 6 |
1 files 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; i<MAX_PICTURE_COUNT; i++){ - free_picture(s, &s->picture[i]); + if(s->picture){ + for(i=0; i<MAX_PICTURE_COUNT; i++){ + free_picture(s, &s->picture[i]); + } } av_freep(&s->picture); avcodec_default_free_buffers(s->avctx); |