Browse Source

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.
tags/n2.0
Janne Grunau 12 years ago
parent
commit
3eae9b030c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/mpegvideo.c

+ 3
- 0
libavcodec/mpegvideo.c View File

@@ -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