diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 792775494a..f2bd75623c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2903,7 +2903,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ else h->list_count= 1; }else - h->list_count= 0; + h->ref_count[1]= h->ref_count[0]= h->list_count= 0; if(!default_ref_list_done){ ff_h264_fill_default_ref_list(h);