diff --git a/libavcodec/cbs_h265.h b/libavcodec/cbs_h265.h index 26a5a34fe9..580c6cd4f4 100644 --- a/libavcodec/cbs_h265.h +++ b/libavcodec/cbs_h265.h @@ -725,8 +725,8 @@ typedef struct H265RawSEI3DReferenceDisplaysInfo { uint8_t ref_viewing_distance_flag; uint8_t prec_ref_viewing_dist; uint8_t num_ref_displays_minus1; - uint8_t left_view_id[31]; - uint8_t right_view_id[31]; + uint16_t left_view_id[31]; + uint16_t right_view_id[31]; uint8_t exponent_ref_display_width[31]; uint8_t mantissa_ref_display_width[31]; uint8_t exponent_ref_viewing_distance[31]; diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c index 1c11514435..e976c38b8d 100644 --- a/libavcodec/cbs_h265_syntax_template.c +++ b/libavcodec/cbs_h265_syntax_template.c @@ -2299,8 +2299,8 @@ SEI_FUNC(sei_3d_reference_displays_info, (CodedBitstreamContext *ctx, RWContext ue(prec_ref_viewing_dist, 0, 31); ue(num_ref_displays_minus1, 0, 31); for (i = 0; i <= current->num_ref_displays_minus1; i++) { - ues(left_view_id[i], 0, UINT8_MAX, 1, i); - ues(right_view_id[i], 0, UINT8_MAX, 1, i); + ues(left_view_id[i], 0, MAX_UINT_BITS(15), 1, i); + ues(right_view_id[i], 0, MAX_UINT_BITS(15), 1, i); us(6, exponent_ref_display_width[i], 0, 62, 1, i); if (!current->exponent_ref_display_width[i]) length = FFMAX(0, (int)current->prec_ref_display_width - 30);