mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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.
This commit is contained in:
parent
5b2b0b912d
commit
3eae9b030c
@ -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…
x
Reference in New Issue
Block a user