You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user