Commit 2428b53f authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

h264: do not let invalid values in h->ref_count on ff_h264_decode_ref_pic_list_reordering() errors.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db5b4875
......@@ -2909,8 +2909,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
ff_h264_fill_default_ref_list(h);
}
if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0)
if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) {
h->ref_count[1]= h->ref_count[0]= 0;
return -1;
}
if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
s->last_picture_ptr= &h->ref_list[0][0];
......
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