aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-23 10:24:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-23 10:25:25 +0200
commit1724123c65b55ec3a6d7a8b2236f9d71b4129132 (patch)
treed035cf42e079c100cd5695387d21653a83721499
parentc54a1565f512858ccfa70392f40f11c098bc1b63 (diff)
parent3eae9b030cbbdc263f69834b791624613032d548 (diff)
downloadffmpeg-1724123c65b55ec3a6d7a8b2236f9d71b4129132.tar.gz
Merge commit '3eae9b030cbbdc263f69834b791624613032d548'
* commit '3eae9b030cbbdc263f69834b791624613032d548': mpegvideo: unref buffers in ff_mpeg_unref_picture on frame size changes Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4ac2f1a5c1..a713099ae9 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -448,6 +448,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);
}