Commit 3eae9b03 authored by Janne Grunau's avatar Janne Grunau

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.
parent 5b2b0b91
......@@ -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);
}
......
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