Commit 9b4b6e09 authored by Michael Niedermayer's avatar Michael Niedermayer

segfault fix

Originally committed as revision 2434 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 94fd9201
...@@ -585,9 +585,11 @@ void MPV_common_end(MpegEncContext *s) ...@@ -585,9 +585,11 @@ void MPV_common_end(MpegEncContext *s)
av_freep(&s->input_picture); av_freep(&s->input_picture);
av_freep(&s->reordered_input_picture); av_freep(&s->reordered_input_picture);
if(s->picture){
for(i=0; i<MAX_PICTURE_COUNT; i++){ for(i=0; i<MAX_PICTURE_COUNT; i++){
free_picture(s, &s->picture[i]); free_picture(s, &s->picture[i]);
} }
}
av_freep(&s->picture); av_freep(&s->picture);
avcodec_default_free_buffers(s->avctx); avcodec_default_free_buffers(s->avctx);
s->context_initialized = 0; s->context_initialized = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment