1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/h264_refs: More completely clear slice contexts in ff_h264_remove_all_refs()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-04 19:30:10 +02:00
parent fc58d5c43b
commit aa6f58dd96

View File

@ -509,8 +509,11 @@ void ff_h264_remove_all_refs(H264Context *h)
h->short_ref_count = 0;
memset(h->default_ref_list, 0, sizeof(h->default_ref_list));
for (i = 0; i < h->nb_slice_ctx; i++)
memset(h->slice_ctx[i].ref_list, 0, sizeof(h->slice_ctx[i].ref_list));
for (i = 0; i < h->nb_slice_ctx; i++) {
H264SliceContext *sl = &h->slice_ctx[i];
sl->list_count = sl->ref_count[0] = sl->ref_count[1] = 0;
memset(sl->ref_list, 0, sizeof(sl->ref_list));
}
}
/**