diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-25 03:29:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-25 03:29:52 +0200 |
commit | be30e44dd929c2557494b1b71084d48d3c002f15 (patch) | |
tree | 854c4f719041063edb5961de3ba068ae01e16dd5 /libavcodec/h264.c | |
parent | ecbf838c7d81ebd3b89fe75d83ff29150dbda27a (diff) | |
download | ffmpeg-be30e44dd929c2557494b1b71084d48d3c002f15.tar.gz |
avcodec/h264: Zero rbsp_buffer earler to ensure no duplicated pointers can leak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e17807339d..d328610fe9 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1787,6 +1787,10 @@ static int decode_update_thread_context(AVCodecContext *dst, h->mb_type_pool = NULL; h->ref_index_pool = NULL; h->motion_val_pool = NULL; + for (i = 0; i < 2; i++) { + h->rbsp_buffer[i] = NULL; + h->rbsp_buffer_size[i] = 0; + } if (h1->context_initialized) { h->context_initialized = 0; @@ -1807,10 +1811,6 @@ static int decode_update_thread_context(AVCodecContext *dst, } } - for (i = 0; i < 2; i++) { - h->rbsp_buffer[i] = NULL; - h->rbsp_buffer_size[i] = 0; - } h->bipred_scratchpad = NULL; h->edge_emu_buffer = NULL; |