mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
hevc_ps: fix cpb_cnt_minus1 initialization
Fixes:fc429d785e
cpb_cnt used to be initialized to 1 beforefc429d785e
so cpb_cnt_minus1 should be initialized to 0. Also add +1 to the decode_sublayer_hrd call to account for the change to the offset
This commit is contained in:
parent
1a87a9d82a
commit
06241c3154
@ -406,8 +406,6 @@ static int decode_hrd(GetBitContext *gb, int common_inf_present,
|
||||
for (int i = 0; i < max_sublayers; i++) {
|
||||
hdr->flags.fixed_pic_rate_general_flag = get_bits1(gb);
|
||||
|
||||
hdr->cpb_cnt_minus1[i] = 1;
|
||||
|
||||
if (!hdr->flags.fixed_pic_rate_general_flag)
|
||||
hdr->flags.fixed_pic_rate_within_cvs_flag = get_bits1(gb);
|
||||
|
||||
@ -426,11 +424,11 @@ static int decode_hrd(GetBitContext *gb, int common_inf_present,
|
||||
}
|
||||
|
||||
if (hdr->flags.nal_hrd_parameters_present_flag)
|
||||
decode_sublayer_hrd(gb, hdr->cpb_cnt_minus1[i], &hdr->nal_params[i],
|
||||
decode_sublayer_hrd(gb, hdr->cpb_cnt_minus1[i]+1, &hdr->nal_params[i],
|
||||
hdr->flags.sub_pic_hrd_params_present_flag);
|
||||
|
||||
if (hdr->flags.vcl_hrd_parameters_present_flag)
|
||||
decode_sublayer_hrd(gb, hdr->cpb_cnt_minus1[i], &hdr->vcl_params[i],
|
||||
decode_sublayer_hrd(gb, hdr->cpb_cnt_minus1[i]+1, &hdr->vcl_params[i],
|
||||
hdr->flags.sub_pic_hrd_params_present_flag);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user