diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-09-19 19:39:52 +0200 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-09-19 19:58:15 +0200 |
commit | 32c7589bb7ce6b8be733aa88e4786955c7c3a638 (patch) | |
tree | 7dfd9e24c9e8599a0104721975548c88a21d2488 | |
parent | ac3a9b51f77e54300827c338df0fd16251c93a73 (diff) | |
download | ffmpeg-32c7589bb7ce6b8be733aa88e4786955c7c3a638.tar.gz |
mpegvideo: release frame buffers before freeing them
Fixes triggering an assert in avcodec_default_release_buffer()
introduced in 1b3439b30.
-rw-r--r-- | libavcodec/mpegvideo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index e2e5276c83..4682ab1121 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1104,14 +1104,15 @@ void ff_MPV_common_end(MpegEncContext *s) av_freep(&s->reordered_input_picture); av_freep(&s->dct_offset); - free_context_frame(s); - if (s->picture && !s->avctx->internal->is_copy) { for (i = 0; i < s->picture_count; i++) { free_picture(s, &s->picture[i]); } } av_freep(&s->picture); + + free_context_frame(s); + s->context_initialized = 0; s->last_picture_ptr = s->next_picture_ptr = |