if (h->pps.redundant_pic_cnt_present)
sl->redundant_pic_count = get_ue_golomb(&sl->gb);
- ret = ff_set_ref_count(h, sl);
+ if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
+ sl->direct_spatial_mv_pred = get_bits1(&sl->gb);
+
+ ret = ff_h264_parse_ref_count(&sl->list_count, sl->ref_count,
+ &sl->gb, &h->pps, sl->slice_type_nos,
+ h->picture_structure, h->avctx);
if (ret < 0)
return ret;