Commit 7ab2c036 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'e9f88441'

* commit 'e9f88441':
  h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 15ad0232 e9f88441
......@@ -1010,8 +1010,6 @@ int ff_set_ref_count(H264Context *h, H264SliceContext *sl)
unsigned max[2];
max[0] = max[1] = h->picture_structure == PICT_FRAME ? 15 : 31;
if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
sl->direct_spatial_mv_pred = get_bits1(&sl->gb);
num_ref_idx_active_override_flag = get_bits1(&sl->gb);
if (num_ref_idx_active_override_flag) {
......
......@@ -150,6 +150,9 @@ static int scan_mmco_reset(AVCodecParserContext *s)
if (h->pps.redundant_pic_cnt_present)
get_ue_golomb(&sl->gb); // redundant_pic_count
if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
get_bits1(&sl->gb); // direct_spatial_mv_pred
if (ff_set_ref_count(h, sl) < 0)
return AVERROR_INVALIDDATA;
......
......@@ -1689,6 +1689,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
if (h->pps.redundant_pic_cnt_present)
sl->redundant_pic_count = get_ue_golomb(&sl->gb);
if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
sl->direct_spatial_mv_pred = get_bits1(&sl->gb);
ret = ff_set_ref_count(h, sl);
if (ret < 0)
return ret;
......
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