Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2013-05-21 19:39:27 +0400
committerJanne Grunau <janne-libav@jannau.net>2013-05-22 17:40:12 +0400
commit3eae9b030cbbdc263f69834b791624613032d548 (patch)
tree93f8912c117398acb0335dd471c0fd5172c9ab87 /libavcodec/mpegvideo.c
parent5b2b0b912dbcd6ee8b598254b083c58d4847ef02 (diff)
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.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b175d32ff1..c9a425abfa 100644
--- a/libavcodec/mpegvideo.c
+++ b/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);
}