1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-25 03:29:52 +02:00
parent ecbf838c7d
commit be30e44dd9

View File

@ -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;