diff options
author | James Almer <jamrial@gmail.com> | 2017-09-26 15:58:40 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-09-26 16:02:40 -0300 |
commit | 318778de9ebec276cb9dfc65509231ca56590d13 (patch) | |
tree | 795c3dc73c18c00f7ce2b09f91184e09d529d332 | |
parent | 2508e606fba86f2e460eebb045e29e1f069a4d72 (diff) | |
parent | fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3 (diff) | |
download | ffmpeg-318778de9ebec276cb9dfc65509231ca56590d13.tar.gz |
Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'
* commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3':
Mark some arrays that never change as const.
Merged-by: James Almer <jamrial@gmail.com>
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libavcodec/aaccoder.c | 2 | ||||
-rw-r--r-- | libavcodec/aacenc.h | 4 | ||||
-rw-r--r-- | libavcodec/amrwbdata.h | 2 | ||||
-rw-r--r-- | libavcodec/atrac3plus.c | 4 | ||||
-rw-r--r-- | libavcodec/dfa.c | 2 | ||||
-rw-r--r-- | libavcodec/g722dec.c | 4 | ||||
-rw-r--r-- | libavcodec/on2avcdata.c | 16 | ||||
-rw-r--r-- | libavcodec/on2avcdata.h | 20 | ||||
-rw-r--r-- | libavcodec/opus_silk.c | 6 | ||||
-rw-r--r-- | libavcodec/qsvdec_h2645.c | 4 | ||||
-rw-r--r-- | libavcodec/qsvenc_hevc.c | 4 | ||||
-rw-r--r-- | libavcodec/tscc2data.h | 6 | ||||
-rw-r--r-- | libavcodec/vaapi_encode.c | 2 | ||||
-rw-r--r-- | libavcodec/vaapi_encode_mjpeg.c | 2 | ||||
-rw-r--r-- | libavcodec/vp8.c | 8 | ||||
-rw-r--r-- | libavcodec/vp9block.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/mlpdsp_init.c | 12 | ||||
-rw-r--r-- | libavformat/hls.c | 4 | ||||
-rw-r--r-- | libavformat/id3v2.c | 2 | ||||
-rw-r--r-- | libavformat/id3v2.h | 2 | ||||
-rw-r--r-- | libavformat/mxfdec.c | 2 | ||||
-rw-r--r-- | libavutil/hwcontext.c | 2 | ||||
-rw-r--r-- | libavutil/hwcontext_vaapi.c | 2 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 10 | ||||
-rw-r--r-- | libavutil/stereo3d.c | 2 |
26 files changed, 64 insertions, 64 deletions
@@ -7034,7 +7034,7 @@ print_enabled_components(){ struct_name=$2 name=$3 shift 3 - echo "static const $struct_name *$name[] = {" > $TMPH + echo "static const $struct_name * const $name[] = {" > $TMPH for c in $*; do enabled $c && printf " &ff_%s,\n" $c >> $TMPH done diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index abd0b9c636..baa82489b1 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -894,7 +894,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe) } } -AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { +const AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { [AAC_CODER_ANMR] = { search_for_quantizers_anmr, encode_window_bands_info, diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index 9d244fd1f5..ea2d3b9628 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -78,7 +78,7 @@ typedef struct AACCoefficientsEncoder { void (*search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce); } AACCoefficientsEncoder; -extern AACCoefficientsEncoder ff_aac_coders[]; +extern const AACCoefficientsEncoder ff_aac_coders[]; typedef struct AACQuantizeBandCostCacheEntry { float rd; @@ -110,7 +110,7 @@ typedef struct AACEncContext { ChannelElement *cpe; ///< channel elements FFPsyContext psy; struct FFPsyPreprocessContext* psypp; - AACCoefficientsEncoder *coder; + const AACCoefficientsEncoder *coder; int cur_channel; ///< current channel for coder context int random_state; float lambda; diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h index e0152a651e..8a8cbfdddf 100644 --- a/libavcodec/amrwbdata.h +++ b/libavcodec/amrwbdata.h @@ -673,7 +673,7 @@ static const uint16_t order_MODE_23k85[] = { }; /** Reordering array addresses for each mode */ -static const uint16_t* amr_bit_orderings_by_mode[] = { +static const uint16_t * const amr_bit_orderings_by_mode[] = { order_MODE_6k60, order_MODE_8k85, order_MODE_12k65, diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index 46e0beafc2..3e3bba801b 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -109,8 +109,8 @@ av_cold void ff_atrac3p_init_vlcs(void) NULL, NULL, atrac3p_ct_huff_xlat1, NULL }; - static const int sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 }; - static const int sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 }; + static const int sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 }; + static const int sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 }; static const uint8_t * const sf_bits[8] = { atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits2, atrac3p_sf_huff_bits3, atrac3p_sf_huff_bits4, atrac3p_sf_huff_bits4, diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 8067ac94e5..43dba2c8e9 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -330,7 +330,7 @@ static const chunk_decoder decoder[8] = { decode_tdlt, decode_dsw1, decode_blck, decode_dds1, }; -static const char* chunk_name[8] = { +static const char * const chunk_name[8] = { "COPY", "TSW1", "BDLT", "WDLT", "TDLT", "DSW1", "BLCK", "DDS1" }; diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 0bfa82a394..000b591fe6 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -80,8 +80,8 @@ static const int16_t low_inv_quant5[32] = { }; static const int16_t * const low_inv_quants[3] = { ff_g722_low_inv_quant6, - low_inv_quant5, - ff_g722_low_inv_quant4 }; + low_inv_quant5, + ff_g722_low_inv_quant4 }; static int g722_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) diff --git a/libavcodec/on2avcdata.c b/libavcodec/on2avcdata.c index abe598350b..ec983572e6 100644 --- a/libavcodec/on2avcdata.c +++ b/libavcodec/on2avcdata.c @@ -7724,12 +7724,12 @@ static const double tabs_9_20[9 * 2][20] = { 0.22783, 0.058894795, -0.61350902, 0.69559873, -0.27013783, } }; -const double* const ff_on2avc_tabs_9_20_1[9] = { +const double * const ff_on2avc_tabs_9_20_1[9] = { tabs_9_20[0], tabs_9_20[1], tabs_9_20[2], tabs_9_20[3], tabs_9_20[4], tabs_9_20[5], tabs_9_20[6], tabs_9_20[7], tabs_9_20[8] }; -const double* const ff_on2avc_tabs_9_20_2[9] = { +const double * const ff_on2avc_tabs_9_20_2[9] = { tabs_9_20[ 9], tabs_9_20[10], tabs_9_20[11], tabs_9_20[12], tabs_9_20[13], tabs_9_20[14], tabs_9_20[15], tabs_9_20[16], tabs_9_20[17] }; @@ -7927,7 +7927,7 @@ static const double tabs_19_40[19 * 2][40] = { 0.019871848, -0.11989559, 0.036659135, 0.26632201, -0.3057397, -0.23220335, 0.68741352, -0.54024027, } }; -const double* const ff_on2avc_tabs_19_40_1[19] = { +const double * const ff_on2avc_tabs_19_40_1[19] = { tabs_19_40[ 0], tabs_19_40[ 1], tabs_19_40[ 2], tabs_19_40[ 3], tabs_19_40[ 4], tabs_19_40[ 5], tabs_19_40[ 6], tabs_19_40[ 7], tabs_19_40[ 8], tabs_19_40[ 9], tabs_19_40[10], tabs_19_40[11], @@ -7935,7 +7935,7 @@ const double* const ff_on2avc_tabs_19_40_1[19] = { tabs_19_40[16], tabs_19_40[17], tabs_19_40[18], }; -const double* const ff_on2avc_tabs_19_40_2[19] = { +const double * const ff_on2avc_tabs_19_40_2[19] = { tabs_19_40[19], tabs_19_40[20], tabs_19_40[21], tabs_19_40[22], tabs_19_40[23], tabs_19_40[24], tabs_19_40[25], tabs_19_40[26], tabs_19_40[27], tabs_19_40[28], tabs_19_40[29], tabs_19_40[30], @@ -8826,7 +8826,7 @@ static const double tabs_20_84[20 * 4][84] = { 0.51434408, -0.41486443, 0.27672635, -0.10432054, }, }; -const double* const ff_on2avc_tabs_20_84_1[20] = { +const double * const ff_on2avc_tabs_20_84_1[20] = { tabs_20_84[ 0], tabs_20_84[ 1], tabs_20_84[ 2], tabs_20_84[ 3], tabs_20_84[ 4], tabs_20_84[ 5], tabs_20_84[ 6], tabs_20_84[ 7], tabs_20_84[ 8], tabs_20_84[ 9], tabs_20_84[10], tabs_20_84[11], @@ -8834,7 +8834,7 @@ const double* const ff_on2avc_tabs_20_84_1[20] = { tabs_20_84[16], tabs_20_84[17], tabs_20_84[18], tabs_20_84[19] }; -const double* const ff_on2avc_tabs_20_84_2[20] = { +const double * const ff_on2avc_tabs_20_84_2[20] = { tabs_20_84[20], tabs_20_84[21], tabs_20_84[22], tabs_20_84[23], tabs_20_84[24], tabs_20_84[25], tabs_20_84[26], tabs_20_84[27], tabs_20_84[28], tabs_20_84[29], tabs_20_84[30], tabs_20_84[31], @@ -8842,7 +8842,7 @@ const double* const ff_on2avc_tabs_20_84_2[20] = { tabs_20_84[36], tabs_20_84[37], tabs_20_84[38], tabs_20_84[39] }; -const double* const ff_on2avc_tabs_20_84_3[20] = { +const double * const ff_on2avc_tabs_20_84_3[20] = { tabs_20_84[40], tabs_20_84[41], tabs_20_84[42], tabs_20_84[43], tabs_20_84[44], tabs_20_84[45], tabs_20_84[46], tabs_20_84[47], tabs_20_84[48], tabs_20_84[49], tabs_20_84[50], tabs_20_84[51], @@ -8850,7 +8850,7 @@ const double* const ff_on2avc_tabs_20_84_3[20] = { tabs_20_84[56], tabs_20_84[57], tabs_20_84[58], tabs_20_84[59] }; -const double* const ff_on2avc_tabs_20_84_4[20] = { +const double * const ff_on2avc_tabs_20_84_4[20] = { tabs_20_84[60], tabs_20_84[61], tabs_20_84[62], tabs_20_84[63], tabs_20_84[64], tabs_20_84[65], tabs_20_84[66], tabs_20_84[67], tabs_20_84[68], tabs_20_84[69], tabs_20_84[70], tabs_20_84[71], diff --git a/libavcodec/on2avcdata.h b/libavcodec/on2avcdata.h index 95d88e0252..dc7833feff 100644 --- a/libavcodec/on2avcdata.h +++ b/libavcodec/on2avcdata.h @@ -64,16 +64,16 @@ extern const double ff_on2avc_tab_84_1[]; extern const double ff_on2avc_tab_84_2[]; extern const double ff_on2avc_tab_84_3[]; extern const double ff_on2avc_tab_84_4[]; -extern const double* const ff_on2avc_tabs_4_10_1[4]; -extern const double* const ff_on2avc_tabs_4_10_2[4]; -extern const double* const ff_on2avc_tabs_9_20_1[9]; -extern const double* const ff_on2avc_tabs_9_20_2[9]; -extern const double* const ff_on2avc_tabs_19_40_1[19]; -extern const double* const ff_on2avc_tabs_19_40_2[19]; -extern const double* const ff_on2avc_tabs_20_84_1[20]; -extern const double* const ff_on2avc_tabs_20_84_2[20]; -extern const double* const ff_on2avc_tabs_20_84_3[20]; -extern const double* const ff_on2avc_tabs_20_84_4[20]; +extern const double * const ff_on2avc_tabs_4_10_1[4]; +extern const double * const ff_on2avc_tabs_4_10_2[4]; +extern const double * const ff_on2avc_tabs_9_20_1[9]; +extern const double * const ff_on2avc_tabs_9_20_2[9]; +extern const double * const ff_on2avc_tabs_19_40_1[19]; +extern const double * const ff_on2avc_tabs_19_40_2[19]; +extern const double * const ff_on2avc_tabs_20_84_1[20]; +extern const double * const ff_on2avc_tabs_20_84_2[20]; +extern const double * const ff_on2avc_tabs_20_84_3[20]; +extern const double * const ff_on2avc_tabs_20_84_4[20]; extern const float ff_on2avc_ctab_1[2048]; extern const float ff_on2avc_ctab_2[2048]; extern const float ff_on2avc_ctab_3[2048]; diff --git a/libavcodec/opus_silk.c b/libavcodec/opus_silk.c index dbf6756864..3c9c849c21 100644 --- a/libavcodec/opus_silk.c +++ b/libavcodec/opus_silk.c @@ -599,7 +599,7 @@ static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc, if (lag_absolute) { /* primary lag is coded absolute */ int highbits, lowbits; - static const uint16_t *model[] = { + static const uint16_t * const model[] = { ff_silk_model_pitch_lowbits_nb, ff_silk_model_pitch_lowbits_mb, ff_silk_model_pitch_lowbits_wb }; @@ -633,11 +633,11 @@ static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc, ltpfilter = ff_opus_rc_dec_cdf(rc, ff_silk_model_ltp_filter); for (i = 0; i < s->subframes; i++) { int index, j; - static const uint16_t *filter_sel[] = { + static const uint16_t * const filter_sel[] = { ff_silk_model_ltp_filter0_sel, ff_silk_model_ltp_filter1_sel, ff_silk_model_ltp_filter2_sel }; - static const int8_t (*filter_taps[])[5] = { + static const int8_t (* const filter_taps[])[5] = { ff_silk_ltp_filter0_taps, ff_silk_ltp_filter1_taps, ff_silk_ltp_filter2_taps }; index = ff_opus_rc_dec_cdf(rc, filter_sel[ltpfilter]); diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c index 276cdf884d..a6b53cce8d 100644 --- a/libavcodec/qsvdec_h2645.c +++ b/libavcodec/qsvdec_h2645.c @@ -84,8 +84,8 @@ static av_cold int qsv_decode_init(AVCodecContext *avctx) int ret; if (avctx->codec_id == AV_CODEC_ID_HEVC && s->load_plugin != LOAD_PLUGIN_NONE) { - static const char *uid_hevcdec_sw = "15dd936825ad475ea34e35f3f54217a6"; - static const char *uid_hevcdec_hw = "33a61c0b4c27454ca8d85dde757c6f8e"; + static const char * const uid_hevcdec_sw = "15dd936825ad475ea34e35f3f54217a6"; + static const char * const uid_hevcdec_hw = "33a61c0b4c27454ca8d85dde757c6f8e"; if (s->qsv.load_plugins[0]) { av_log(avctx, AV_LOG_WARNING, diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index 7d4d55bb61..b0e5ace7c7 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -161,8 +161,8 @@ static av_cold int qsv_enc_init(AVCodecContext *avctx) int ret; if (q->load_plugin != LOAD_PLUGIN_NONE) { - static const char *uid_hevcenc_sw = "2fca99749fdb49aeb121a5b63ef568f7"; - static const char *uid_hevcenc_hw = "6fadc791a0c2eb479ab6dcd5ea9da347"; + static const char * const uid_hevcenc_sw = "2fca99749fdb49aeb121a5b63ef568f7"; + static const char * const uid_hevcenc_hw = "6fadc791a0c2eb479ab6dcd5ea9da347"; if (q->qsv.load_plugins[0]) { av_log(avctx, AV_LOG_WARNING, diff --git a/libavcodec/tscc2data.h b/libavcodec/tscc2data.h index 7cd6f5216e..5e8d18b3f5 100644 --- a/libavcodec/tscc2data.h +++ b/libavcodec/tscc2data.h @@ -903,14 +903,14 @@ static const int tscc2_ac_vlc_sizes[NUM_VLC_SETS] = { 172, 169, 165, 162, 131, 132, 130, 125, 121, 114, 110, 101, 96 }; -static const uint16_t *tscc2_ac_vlc_syms[NUM_VLC_SETS] = { +static const uint16_t * const tscc2_ac_vlc_syms[NUM_VLC_SETS] = { ac_vlc_desc0_syms, ac_vlc_desc1_syms, ac_vlc_desc2_syms, ac_vlc_desc3_syms, ac_vlc_desc4_syms, ac_vlc_desc5_syms, ac_vlc_desc6_syms, ac_vlc_desc7_syms, ac_vlc_desc8_syms, ac_vlc_desc9_syms, ac_vlc_descA_syms, ac_vlc_descB_syms, ac_vlc_descC_syms, }; -static const uint16_t *tscc2_ac_vlc_codes[NUM_VLC_SETS] = { +static const uint16_t * const tscc2_ac_vlc_codes[NUM_VLC_SETS] = { ac_vlc_desc0_codes, ac_vlc_desc1_codes, ac_vlc_desc2_codes, ac_vlc_desc3_codes, ac_vlc_desc4_codes, ac_vlc_desc5_codes, ac_vlc_desc6_codes, ac_vlc_desc7_codes, ac_vlc_desc8_codes, @@ -918,7 +918,7 @@ static const uint16_t *tscc2_ac_vlc_codes[NUM_VLC_SETS] = { ac_vlc_descC_codes, }; -static const uint8_t *tscc2_ac_vlc_bits[NUM_VLC_SETS] = { +static const uint8_t * const tscc2_ac_vlc_bits[NUM_VLC_SETS] = { ac_vlc_desc0_bits, ac_vlc_desc1_bits, ac_vlc_desc2_bits, ac_vlc_desc3_bits, ac_vlc_desc4_bits, ac_vlc_desc5_bits, ac_vlc_desc6_bits, ac_vlc_desc7_bits, ac_vlc_desc8_bits, ac_vlc_desc9_bits, ac_vlc_descA_bits, ac_vlc_descB_bits, diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 4d7683f146..e13e99587d 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -27,7 +27,7 @@ #include "vaapi_encode.h" #include "avcodec.h" -static const char *picture_type_name[] = { "IDR", "I", "P", "B" }; +static const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; static int vaapi_encode_make_packed_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c index 3afce28a10..2cbf7925f2 100644 --- a/libavcodec/vaapi_encode_mjpeg.c +++ b/libavcodec/vaapi_encode_mjpeg.c @@ -361,7 +361,7 @@ static av_cold int vaapi_encode_mjpeg_configure(AVCodecContext *avctx) return 0; } -static VAAPIEncodeType vaapi_encode_type_mjpeg = { +static const VAAPIEncodeType vaapi_encode_type_mjpeg = { .priv_data_size = sizeof(VAAPIEncodeMJPEGContext), .configure = &vaapi_encode_mjpeg_configure, diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 5bf601a8ef..7841a9d964 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1171,10 +1171,10 @@ void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, uint8_t *segment, uint8_t *ref, int layout, int is_vp7) { VP56RangeCoder *c = &s->c; - static const char *vp7_feature_name[] = { "q-index", - "lf-delta", - "partial-golden-update", - "blit-pitch" }; + static const char * const vp7_feature_name[] = { "q-index", + "lf-delta", + "partial-golden-update", + "blit-pitch" }; if (is_vp7) { int i; *segment = 0; diff --git a/libavcodec/vp9block.c b/libavcodec/vp9block.c index d4ace149a5..1c3f7a7225 100644 --- a/libavcodec/vp9block.c +++ b/libavcodec/vp9block.c @@ -976,7 +976,7 @@ static av_always_inline int decode_coeffs(VP9TileData *td, int is8bitsperpixel) int16_t (*qmul)[2] = s->s.h.segmentation.feat[b->seg_id].qmul; int tx = 4 * s->s.h.lossless + b->tx; const int16_t * const *yscans = ff_vp9_scans[tx]; - const int16_t (* const *ynbs)[2] = ff_vp9_scans_nb[tx]; + const int16_t (* const * ynbs)[2] = ff_vp9_scans_nb[tx]; const int16_t *uvscan = ff_vp9_scans[b->uvtx][DCT_DCT]; const int16_t (*uvnb)[2] = ff_vp9_scans_nb[b->uvtx][DCT_DCT]; uint8_t *a = &s->above_y_nnz_ctx[col * 2]; diff --git a/libavcodec/x86/mlpdsp_init.c b/libavcodec/x86/mlpdsp_init.c index 7f5e6b11d5..cb90ca24f0 100644 --- a/libavcodec/x86/mlpdsp_init.c +++ b/libavcodec/x86/mlpdsp_init.c @@ -61,13 +61,13 @@ extern char ff_mlp_iirorder_1; extern char ff_mlp_iirorder_0; static const void * const firtable[9] = { &ff_mlp_firorder_0, &ff_mlp_firorder_1, - &ff_mlp_firorder_2, &ff_mlp_firorder_3, - &ff_mlp_firorder_4, &ff_mlp_firorder_5, - &ff_mlp_firorder_6, &ff_mlp_firorder_7, - &ff_mlp_firorder_8 }; + &ff_mlp_firorder_2, &ff_mlp_firorder_3, + &ff_mlp_firorder_4, &ff_mlp_firorder_5, + &ff_mlp_firorder_6, &ff_mlp_firorder_7, + &ff_mlp_firorder_8 }; static const void * const iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1, - &ff_mlp_iirorder_2, &ff_mlp_iirorder_3, - &ff_mlp_iirorder_4 }; + &ff_mlp_iirorder_2, &ff_mlp_iirorder_3, + &ff_mlp_iirorder_4 }; #if ARCH_X86_64 diff --git a/libavformat/hls.c b/libavformat/hls.c index 0995345bbf..786934af03 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1498,9 +1498,9 @@ static int select_cur_seq_no(HLSContext *c, struct playlist *pls) static int save_avio_options(AVFormatContext *s) { HLSContext *c = s->priv_data; - static const char *opts[] = { + static const char * const opts[] = { "headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL }; - const char **opt = opts; + const char * const * opt = opts; uint8_t *buf; int ret = 0; diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 05346350ad..f15cefee47 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -102,7 +102,7 @@ const char ff_id3v2_3_tags[][4] = { { 0 }, }; -const char *ff_id3v2_picture_types[21] = { +const char * const ff_id3v2_picture_types[21] = { "Other", "32x32 pixels 'file icon'", "Other file icon", diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h index 9d7bf1c03c..6e7a8c9abf 100644 --- a/libavformat/id3v2.h +++ b/libavformat/id3v2.h @@ -180,6 +180,6 @@ extern const char ff_id3v2_3_tags[][4]; extern const CodecMime ff_id3v2_mime_tags[]; -extern const char *ff_id3v2_picture_types[21]; +extern const char * const ff_id3v2_picture_types[21]; #endif /* AVFORMAT_ID3V2_H */ diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 476d284c96..1855f95d79 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1204,7 +1204,7 @@ static const MXFCodecUL mxf_data_essence_container_uls[] = { { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE }, }; -static const char* const mxf_data_essence_descriptor[] = { +static const char * const mxf_data_essence_descriptor[] = { "vbi_vanc_smpte_436M", }; diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index aa6b3ad176..2f4ee9661e 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -28,7 +28,7 @@ #include "pixdesc.h" #include "pixfmt.h" -static const HWContextType *const hw_table[] = { +static const HWContextType * const hw_table[] = { #if CONFIG_CUDA &ff_hwcontext_type_cuda, #endif diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index c4473a229f..9214dc6e50 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -93,7 +93,7 @@ typedef struct VAAPIMapping { } // The map fourcc <-> pix_fmt isn't bijective because of the annoying U/V // plane swap cases. The frame handling below tries to hide these. -static struct { +static const struct { unsigned int fourcc; unsigned int rt_format; enum AVPixelFormat pix_fmt; diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index b39afe3758..2cfab89c03 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2246,13 +2246,13 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { FF_ENABLE_DEPRECATION_WARNINGS #endif -static const char *color_range_names[] = { +static const char * const color_range_names[] = { [AVCOL_RANGE_UNSPECIFIED] = "unknown", [AVCOL_RANGE_MPEG] = "tv", [AVCOL_RANGE_JPEG] = "pc", }; -static const char *color_primaries_names[AVCOL_PRI_NB] = { +static const char * const color_primaries_names[AVCOL_PRI_NB] = { [AVCOL_PRI_RESERVED0] = "reserved", [AVCOL_PRI_BT709] = "bt709", [AVCOL_PRI_UNSPECIFIED] = "unknown", @@ -2269,7 +2269,7 @@ static const char *color_primaries_names[AVCOL_PRI_NB] = { [AVCOL_PRI_JEDEC_P22] = "jedec-p22", }; -static const char *color_transfer_names[] = { +static const char * const color_transfer_names[] = { [AVCOL_TRC_RESERVED0] = "reserved", [AVCOL_TRC_BT709] = "bt709", [AVCOL_TRC_UNSPECIFIED] = "unknown", @@ -2291,7 +2291,7 @@ static const char *color_transfer_names[] = { [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67", }; -static const char *color_space_names[] = { +static const char * const color_space_names[] = { [AVCOL_SPC_RGB] = "gbr", [AVCOL_SPC_BT709] = "bt709", [AVCOL_SPC_UNSPECIFIED] = "unknown", @@ -2309,7 +2309,7 @@ static const char *color_space_names[] = { [AVCOL_SPC_ICTCP] = "ictcp", }; -static const char *chroma_location_names[] = { +static const char * const chroma_location_names[] = { [AVCHROMA_LOC_UNSPECIFIED] = "unspecified", [AVCHROMA_LOC_LEFT] = "left", [AVCHROMA_LOC_CENTER] = "center", diff --git a/libavutil/stereo3d.c b/libavutil/stereo3d.c index a53836424d..6edcdb1796 100644 --- a/libavutil/stereo3d.c +++ b/libavutil/stereo3d.c @@ -43,7 +43,7 @@ AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame) return (AVStereo3D *)side_data->data; } -static const char *stereo3d_type_names[] = { +static const char * const stereo3d_type_names[] = { [AV_STEREO3D_2D] = "2D", [AV_STEREO3D_SIDEBYSIDE] = "side by side", [AV_STEREO3D_TOPBOTTOM] = "top and bottom", |