H265: Fixed inaccurate parsing of ref pic list modification (#773)

Fixes #717: playback issue of HEVC content with cbcs encryption in AVplayer.
This commit is contained in:
Alen Vrečko 2020-05-24 20:51:42 +02:00 committed by GitHub
parent ca47cd7a0d
commit 15934d66c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@
#
# Please keep the list sorted.
Alen Vrecko <alen.vrecko@gmail.com>
Anders Hasselqvist <anders.hasselqvist@gmail.com>
Chun-da Chen <capitalm.c@gmail.com>
Daniel Cantarín <canta@canta.com.ar>

View File

@ -22,6 +22,7 @@
#
# Please keep the list sorted.
Alen Vrecko <alen.vrecko@gmail.com>
Anders Hasselqvist <anders.hasselqvist@gmail.com>
Bei Li <beil@google.com>
Chun-da Chen <capitalm.c@gmail.com>

View File

@ -877,7 +877,7 @@ H265Parser::Result H265Parser::SkipReferencePictureListModification(
bool ref_pic_list_modification_flag_l0;
TRUE_OR_RETURN(br->ReadBool(&ref_pic_list_modification_flag_l0));
if (ref_pic_list_modification_flag_l0) {
for (int i = 0; i <= pps.num_ref_idx_l0_default_active_minus1; i++) {
for (int i = 0; i <= slice_header.num_ref_idx_l0_active_minus1; i++) {
TRUE_OR_RETURN(br->SkipBits(ceil(log2(num_pic_total_curr))));
}
}
@ -886,7 +886,7 @@ H265Parser::Result H265Parser::SkipReferencePictureListModification(
bool ref_pic_list_modification_flag_l1;
TRUE_OR_RETURN(br->ReadBool(&ref_pic_list_modification_flag_l1));
if (ref_pic_list_modification_flag_l1) {
for (int i = 0; i <= pps.num_ref_idx_l1_default_active_minus1; i++) {
for (int i = 0; i <= slice_header.num_ref_idx_l1_active_minus1; i++) {
TRUE_OR_RETURN(br->SkipBits(ceil(log2(num_pic_total_curr))));
}
}