h264: split reading the ref list modifications and actually building the ref list

This will allow postponing the reference list construction (and by
consequence some other functions, like frame_start) until the whole
slice header has been parsed.
This commit is contained in:
Anton Khirnov
2016-04-15 16:10:21 +02:00
parent fa57059079
commit ed9a20ebe4
3 changed files with 118 additions and 88 deletions

View File

@@ -1347,6 +1347,9 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
sl->ref_count[1] = sl->ref_count[0] = 0;
return ret;
}
ret = ff_h264_build_ref_list(h, sl);
if (ret < 0)
return ret;
}
if ((pps->weighted_pred && sl->slice_type_nos == AV_PICTURE_TYPE_P) ||