History

avcodec/cbs: constify decompose_unit_types

CBS doesn't change its contents in any way whatsoever internally, and most users already set it to a const array.

James Almer committed 5 years ago

Commit 9219ed21 parent a0acc443 files · +3 −3Browse files

Unified · Split

3 files
  1. libavcodec/av1_frame_split_bsf.c +1 −1
  2. libavcodec/av1_parser.c +1 −1
  3. libavcodec/cbs.h +1 −1
libavcodec/av1_frame_split_bsf.c+1−1
@@ -214,7 +214,7 @@ static int av1_frame_split_init(AVBSFContext *ctx) · 213 unmodified lines
214214 if (ret < 0)
215215 return ret;
216216
217− s->cbc->decompose_unit_types = (CodedBitstreamUnitType*)decompose_unit_types;
217+ s->cbc->decompose_unit_types = decompose_unit_types;
218218 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
219219
220220 if (!ctx->par_in->extradata_size)
libavcodec/av1_parser.c+1−1
@@ -191,7 +191,7 @@ static av_cold int av1_parser_init(AVCodecParserContext *ctx) · 190 unmodified lines
191191 if (ret < 0)
192192 return ret;
193193
194− s->cbc->decompose_unit_types = (CodedBitstreamUnitType *)decompose_unit_types;
194+ s->cbc->decompose_unit_types = decompose_unit_types;
195195 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
196196
197197 return 0;
libavcodec/cbs.h+1−1
@@ -196,7 +196,7 @@ typedef struct CodedBitstreamContext { · 195 unmodified lines
196196 * Types not in this list will be available in bitstream form only.
197197 * If NULL, all supported types will be decomposed.
198198 */
199− CodedBitstreamUnitType *decompose_unit_types;
199+ const CodedBitstreamUnitType *decompose_unit_types;
200200 /**
201201 * Length of the decompose_unit_types array.
202202 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t