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
214 if (ret < 0)214 if (ret < 0)
215 return ret;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 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);218 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
219 219
220 if (!ctx->par_in->extradata_size)220 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
191 if (ret < 0)191 if (ret < 0)
192 return ret;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 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);195 s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
196 196
197 return 0;197 return 0;
libavcodec/cbs.h+1−1
@@ -196,7 +196,7 @@ typedef struct CodedBitstreamContext { · 195 unmodified lines
196 * Types not in this list will be available in bitstream form only.196 * Types not in this list will be available in bitstream form only.
197 * If NULL, all supported types will be decomposed.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 * Length of the decompose_unit_types array.201 * Length of the decompose_unit_types array.
202 */202 */

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