Commit be30e44d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264: Zero rbsp_buffer earler to ensure no duplicated pointers can leak

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ecbf838c
...@@ -1787,6 +1787,10 @@ static int decode_update_thread_context(AVCodecContext *dst, ...@@ -1787,6 +1787,10 @@ static int decode_update_thread_context(AVCodecContext *dst,
h->mb_type_pool = NULL; h->mb_type_pool = NULL;
h->ref_index_pool = NULL; h->ref_index_pool = NULL;
h->motion_val_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) { if (h1->context_initialized) {
h->context_initialized = 0; h->context_initialized = 0;
...@@ -1807,10 +1811,6 @@ static int decode_update_thread_context(AVCodecContext *dst, ...@@ -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->bipred_scratchpad = NULL;
h->edge_emu_buffer = NULL; h->edge_emu_buffer = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment