mpegvideo: release frame buffers before freeing them

Fixes triggering an assert in avcodec_default_release_buffer()
introduced in 1b3439b30.
pull/28/head
Janne Grunau 12 years ago
parent ac3a9b51f7
commit 32c7589bb7
  1. 5
      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 =

Loading…
Cancel
Save