CBS doesn't change its contents in any way whatsoever internally, and most users already set it to a const array.
Unified · Split
| @@ -214,7 +214,7 @@ static int av1_frame_split_init(AVBSFContext *ctx) · 213 unmodified lines | ||
| 214 | 214 | if (ret < 0) |
| 215 | 215 | return ret; |
| 216 | 216 | |
| 217 | − s->cbc->decompose_unit_types = (CodedBitstreamUnitType*)decompose_unit_types; | |
| 217 | + s->cbc->decompose_unit_types = decompose_unit_types; | |
| 218 | 218 | s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types); |
| 219 | 219 | |
| 220 | 220 | if (!ctx->par_in->extradata_size) |
| @@ -191,7 +191,7 @@ static av_cold int av1_parser_init(AVCodecParserContext *ctx) · 190 unmodified lines | ||
| 191 | 191 | if (ret < 0) |
| 192 | 192 | return ret; |
| 193 | 193 | |
| 194 | − s->cbc->decompose_unit_types = (CodedBitstreamUnitType *)decompose_unit_types; | |
| 194 | + s->cbc->decompose_unit_types = decompose_unit_types; | |
| 195 | 195 | s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types); |
| 196 | 196 | |
| 197 | 197 | return 0; |
| @@ -196,7 +196,7 @@ typedef struct CodedBitstreamContext { · 195 unmodified lines | ||
| 196 | 196 | * Types not in this list will be available in bitstream form only. |
| 197 | 197 | * If NULL, all supported types will be decomposed. |
| 198 | 198 | */ |
| 199 | − CodedBitstreamUnitType *decompose_unit_types; | |
| 199 | + const CodedBitstreamUnitType *decompose_unit_types; | |
| 200 | 200 | /** |
| 201 | 201 | * Length of the decompose_unit_types array. |
| 202 | 202 | */ |