| @@ -3374,8 +3374,9 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw, · 3373 unmodified lines |
| 3374 | 3374 | for (i = 0; i < current->sh_slice_header_extension_length; i++) |
| 3375 | 3375 | us(8, sh_slice_header_extension_data_byte[i], 0x00, 0xff, 1, i); |
| 3376 | 3376 | } |
| 3377 | + |
| 3378 | + current->num_entry_points = 0; |
| 3377 | 3379 | if (sps->sps_entry_point_offsets_present_flag) { |
| 3378 | | − int num_entry_points = 0; |
| 3379 | 3380 | uint8_t entropy_sync = sps->sps_entropy_coding_sync_enabled_flag; |
| 3380 | 3381 | int height; |
| 3381 | 3382 | if (pps->pps_rect_slice_flag) { |
| @@ -3392,7 +3393,7 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw, · 10 unmodified lines |
| 3392 | 3393 | else |
| 3393 | 3394 | height = pps->pps_slice_height_in_tiles_minus1[slice_idx] + 1; |
| 3394 | 3395 | |
| 3395 | | − num_entry_points = width_in_tiles * height; |
| 3396 | + current->num_entry_points = width_in_tiles * height; |
| 3396 | 3397 | } else { |
| 3397 | 3398 | int tile_idx; |
| 3398 | 3399 | int tile_y; |
| @@ -3402,18 +3403,18 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw, · 3 unmodified lines |
| 3402 | 3403 | current->sh_num_tiles_in_slice_minus1; tile_idx++) { |
| 3403 | 3404 | tile_y = tile_idx / pps->num_tile_rows; |
| 3404 | 3405 | height = pps->row_height_val[tile_y]; |
| 3405 | | − num_entry_points += (entropy_sync ? height : 1); |
| 3406 | + current->num_entry_points += (entropy_sync ? height : 1); |
| 3406 | 3407 | } |
| 3407 | 3408 | } |
| 3408 | | − num_entry_points--; |
| 3409 | | − if (num_entry_points > VVC_MAX_ENTRY_POINTS) { |
| 3409 | + current->num_entry_points--; |
| 3410 | + if (current->num_entry_points > VVC_MAX_ENTRY_POINTS) { |
| 3410 | 3411 | av_log(ctx->log_ctx, AV_LOG_ERROR, "Too many entry points: " |
| 3411 | | − "%" PRIu16 ".\n", num_entry_points); |
| 3412 | + "%" PRIu16 ".\n", current->num_entry_points); |
| 3412 | 3413 | return AVERROR_PATCHWELCOME; |
| 3413 | 3414 | } |
| 3414 | | − if (num_entry_points > 0) { |
| 3415 | + if (current->num_entry_points > 0) { |
| 3415 | 3416 | ue(sh_entry_offset_len_minus1, 0, 31); |
| 3416 | | − for (i = 0; i < num_entry_points; i++) { |
| 3417 | + for (i = 0; i < current->num_entry_points; i++) { |
| 3417 | 3418 | ubs(current->sh_entry_offset_len_minus1 + 1, |
| 3418 | 3419 | sh_entry_point_offset_minus1[i], 1, i); |
| 3419 | 3420 | } |