mpegvideo: unref buffers in ff_mpeg_unref_picture on frame size changes

ff_mpeg_unref_picture clears the flag indicating that the frame needs to
be reallocated after a frame size change. Since we have now reference
counted buffers we can unref the buffers immediately.
pull/18/merge
Janne Grunau 12 years ago
parent 5b2b0b912d
commit 3eae9b030c
  1. 3
      libavcodec/mpegvideo.c

@ -435,6 +435,9 @@ void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)
av_buffer_unref(&pic->hwaccel_priv_buf);
if (pic->needs_realloc)
free_picture_tables(pic);
memset((uint8_t*)pic + off, 0, sizeof(*pic) - off);
}

Loading…
Cancel
Save