summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-25 03:15:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-25 03:30:31 +0200
commit626739ebbb76b14b03c9946c192570938f5e2494 (patch)
tree8d40c96d08dd93f170b380f65a4a09ef5b2e51f6 /libavcodec/h264.c
parentbe30e44dd929c2557494b1b71084d48d3c002f15 (diff)
avcodec/h264: Free rbsp_buffer before copying context over it
Fixes memleak Fixes Ticket1900 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d328610fe9..1d069a888e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1767,6 +1767,8 @@ static int decode_update_thread_context(AVCodecContext *dst,
for (i = 0; i < MAX_PPS_COUNT; i++)
av_freep(h->pps_buffers + i);
+ av_freep(&h->rbsp_buffer[0]);
+ av_freep(&h->rbsp_buffer[1]);
memcpy(h, h1, offsetof(H264Context, intra_pcm_ptr));
memcpy(&h->cabac, &h1->cabac,
sizeof(H264Context) - offsetof(H264Context, cabac));