Commit aa6f58dd authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fc58d5c4
......@@ -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));
}
}
/**
......
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