@@ -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];
@@ -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);
view_id_len in VPS is 4 bits, so view_id values can be up to 15 bits long. Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/cbs_h265.h | 4 ++-- libavcodec/cbs_h265_syntax_template.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)