[FFmpeg-cvslog] Add missing "const" all over the place.

Reimar Döffinger git at videolan.org
Fri Aug 29 18:59:02 CEST 2014


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Fri Aug 29 00:32:32 2014 +0200| [d9e2aceb7f1c712a52672129ca7971872b030e1e] | committer: Reimar Döffinger

Add missing "const" all over the place.

Only "./configure --enable-gpl" on x86 was tested.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9e2aceb7f1c712a52672129ca7971872b030e1e
---

 ffserver.c                      |    2 +-
 libavcodec/aaccoder.c           |    2 +-
 libavcodec/aic.c                |    2 +-
 libavcodec/atrac3plus.c         |   38 +++++++++++++++++++-------------------
 libavcodec/dcaenc.h             |    4 ++--
 libavcodec/evrcdata.h           |    2 +-
 libavcodec/g722dec.c            |    2 +-
 libavcodec/indeo3.c             |    4 ++--
 libavcodec/indeo4data.h         |    2 +-
 libavcodec/mips/aaccoder_mips.c |    2 +-
 libavcodec/movtextenc.c         |    2 +-
 libavcodec/ppc/fdctdsp.c        |    2 +-
 libavcodec/sipr.c               |    2 +-
 libavcodec/siprdata.h           |    2 +-
 libavcodec/wavpackenc.h         |    2 +-
 libavcodec/x86/mlpdsp.c         |    4 ++--
 libavcodec/x86/videodsp_init.c  |    8 ++++----
 libavdevice/bktr.c              |    2 +-
 libavdevice/opengl_enc.c        |    2 +-
 libavfilter/af_volume.c         |    2 +-
 libavfilter/f_perms.c           |    2 +-
 libavfilter/vf_colormatrix.c    |    2 +-
 libavfilter/vf_drawtext.c       |    2 +-
 libavfilter/vf_overlay.c        |    2 +-
 libavfilter/vf_rotate.c         |    4 ++--
 libavfilter/vf_subtitles.c      |    2 +-
 libavformat/libmodplug.c        |    2 +-
 libavformat/mov_chan.c          |    2 +-
 libavformat/rtspcodes.h         |    2 +-
 libavresample/audio_mix.c       |    2 +-
 libavutil/frame.c               |    2 +-
 libpostproc/postprocess.c       |    2 +-
 32 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index c1c8530..dc7c5f2 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -91,7 +91,7 @@ enum HTTPState {
     RTSPSTATE_SEND_PACKET,
 };
 
-static const char *http_state[] = {
+static const char * const http_state[] = {
     "HTTP_WAIT_REQUEST",
     "HTTP_SEND_HEADER",
 
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 37548aa..5bf6a9c 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -53,7 +53,7 @@ static const uint8_t run_value_bits_short[16] = {
     3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9
 };
 
-static const uint8_t *run_value_bits[2] = {
+static const uint8_t * const run_value_bits[2] = {
     run_value_bits_long, run_value_bits_short
 };
 
diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index 00be08b..3472301 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -132,7 +132,7 @@ static const uint8_t aic_c_ext_scan[192] = {
     177, 184, 176, 169, 162, 161, 168, 160,
 };
 
-static const uint8_t *aic_scan[NUM_BANDS] = {
+static const uint8_t * const aic_scan[NUM_BANDS] = {
     aic_y_scan, aic_c_scan, aic_y_ext_scan, aic_c_ext_scan
 };
 
diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c
index 08c90cd..f7a42cc 100644
--- a/libavcodec/atrac3plus.c
+++ b/libavcodec/atrac3plus.c
@@ -84,52 +84,52 @@ av_cold void ff_atrac3p_init_vlcs(void)
 {
     int i, wl_vlc_offs, ct_vlc_offs, sf_vlc_offs, tab_offset;
 
-    static int wl_nb_bits[4]  = { 2, 3, 5, 5 };
-    static int wl_nb_codes[4] = { 3, 5, 8, 8 };
-    static const uint8_t *wl_bits[4] = {
+    static const int wl_nb_bits[4]  = { 2, 3, 5, 5 };
+    static const int wl_nb_codes[4] = { 3, 5, 8, 8 };
+    static const uint8_t * const wl_bits[4] = {
         atrac3p_wl_huff_bits1, atrac3p_wl_huff_bits2,
         atrac3p_wl_huff_bits3, atrac3p_wl_huff_bits4
     };
-    static const uint8_t *wl_codes[4] = {
+    static const uint8_t * const wl_codes[4] = {
         atrac3p_wl_huff_code1, atrac3p_wl_huff_code2,
         atrac3p_wl_huff_code3, atrac3p_wl_huff_code4
     };
-    static const uint8_t *wl_xlats[4] = {
+    static const uint8_t * const wl_xlats[4] = {
         atrac3p_wl_huff_xlat1, atrac3p_wl_huff_xlat2, NULL, NULL
     };
 
-    static int ct_nb_bits[4]  = { 3, 4, 4, 4 };
-    static int ct_nb_codes[4] = { 4, 8, 8, 8 };
-    static const uint8_t *ct_bits[4]  = {
+    static const int ct_nb_bits[4]  = { 3, 4, 4, 4 };
+    static const int ct_nb_codes[4] = { 4, 8, 8, 8 };
+    static const uint8_t * const ct_bits[4]  = {
         atrac3p_ct_huff_bits1, atrac3p_ct_huff_bits2,
         atrac3p_ct_huff_bits2, atrac3p_ct_huff_bits3
     };
-    static const uint8_t *ct_codes[4] = {
+    static const uint8_t * const ct_codes[4] = {
         atrac3p_ct_huff_code1, atrac3p_ct_huff_code2,
         atrac3p_ct_huff_code2, atrac3p_ct_huff_code3
     };
-    static const uint8_t *ct_xlats[4] = {
+    static const uint8_t * const ct_xlats[4] = {
         NULL, NULL, atrac3p_ct_huff_xlat1, NULL
     };
 
-    static int sf_nb_bits[8]  = {  9,  9,  9,  9,  6,  6,  7,  7 };
-    static int sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 };
-    static const uint8_t  *sf_bits[8]  = {
+    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,
         atrac3p_sf_huff_bits5, atrac3p_sf_huff_bits6
     };
-    static const uint16_t *sf_codes[8] = {
+    static const uint16_t * const sf_codes[8] = {
         atrac3p_sf_huff_code1, atrac3p_sf_huff_code1, atrac3p_sf_huff_code2,
         atrac3p_sf_huff_code3, atrac3p_sf_huff_code4, atrac3p_sf_huff_code4,
         atrac3p_sf_huff_code5, atrac3p_sf_huff_code6
     };
-    static const uint8_t  *sf_xlats[8] = {
+    static const uint8_t  * const sf_xlats[8] = {
         atrac3p_sf_huff_xlat1, atrac3p_sf_huff_xlat2, NULL, NULL,
         atrac3p_sf_huff_xlat4, atrac3p_sf_huff_xlat5, NULL, NULL
     };
 
-    static const uint8_t *gain_cbs[11] = {
+    static const uint8_t * const gain_cbs[11] = {
         atrac3p_huff_gain_npoints1_cb, atrac3p_huff_gain_npoints1_cb,
         atrac3p_huff_gain_lev1_cb, atrac3p_huff_gain_lev2_cb,
         atrac3p_huff_gain_lev3_cb, atrac3p_huff_gain_lev4_cb,
@@ -137,7 +137,7 @@ av_cold void ff_atrac3p_init_vlcs(void)
         atrac3p_huff_gain_loc4_cb, atrac3p_huff_gain_loc2_cb,
         atrac3p_huff_gain_loc5_cb
     };
-    static const uint8_t *gain_xlats[11] = {
+    static const uint8_t * const gain_xlats[11] = {
         NULL, atrac3p_huff_gain_npoints2_xlat, atrac3p_huff_gain_lev1_xlat,
         atrac3p_huff_gain_lev2_xlat, atrac3p_huff_gain_lev3_xlat,
         atrac3p_huff_gain_lev4_xlat, atrac3p_huff_gain_loc3_xlat,
@@ -145,13 +145,13 @@ av_cold void ff_atrac3p_init_vlcs(void)
         atrac3p_huff_gain_loc2_xlat, atrac3p_huff_gain_loc5_xlat
     };
 
-    static const uint8_t *tone_cbs[7] = {
+    static const uint8_t * const tone_cbs[7] = {
         atrac3p_huff_tonebands_cb,  atrac3p_huff_numwavs1_cb,
         atrac3p_huff_numwavs2_cb,   atrac3p_huff_wav_ampsf1_cb,
         atrac3p_huff_wav_ampsf2_cb, atrac3p_huff_wav_ampsf3_cb,
         atrac3p_huff_freq_cb
     };
-    static const uint8_t *tone_xlats[7] = {
+    static const uint8_t * const tone_xlats[7] = {
         NULL, NULL, atrac3p_huff_numwavs2_xlat, atrac3p_huff_wav_ampsf1_xlat,
         atrac3p_huff_wav_ampsf2_xlat, atrac3p_huff_wav_ampsf3_xlat,
         atrac3p_huff_freq_xlat
diff --git a/libavcodec/dcaenc.h b/libavcodec/dcaenc.h
index 20f557b..0443ca6 100644
--- a/libavcodec/dcaenc.h
+++ b/libavcodec/dcaenc.h
@@ -38,12 +38,12 @@ static const uint8_t bitstream_sfreq[] = { 1, 2, 3, 6, 7, 8, 11, 12, 13 };
 /* Auditory filter center frequencies and bandwidths, in Hz.
  * The last two are made up, because there is no scientific data.
  */
-static uint16_t fc[] = {
+static const uint16_t fc[] = {
     50, 150, 250, 350, 450, 570, 700, 840, 1000, 1170, 1370, 1600, 1850, 2150,
     2500, 2900, 3400, 4000, 4800, 5800, 7000, 8500, 10500, 13500, 17000
 };
 
-static uint16_t erb[] = {
+static const uint16_t erb[] = {
     80, 100, 100, 100, 110, 120, 140, 150, 160, 190, 210, 240, 280,
     320, 380, 450, 550, 700, 900, 1100, 1300, 1800, 2500, 3500, 4500
 };
diff --git a/libavcodec/evrcdata.h b/libavcodec/evrcdata.h
index ebcb0ac..8cfc202 100644
--- a/libavcodec/evrcdata.h
+++ b/libavcodec/evrcdata.h
@@ -1451,7 +1451,7 @@ static const float * const evrc_lspq_quant_codebooks[] = {
     evrc_lspq_quant_codebook1[0], evrc_lspq_quant_codebook2[0],
 };
 
-static const float * const *evrc_lspq_codebooks[] = {
+static const float * const * const evrc_lspq_codebooks[] = {
     0,
     evrc_lspq_quant_codebooks,
     0,
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index 470fbbf..14bd67e 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -77,7 +77,7 @@ static const int16_t low_inv_quant5[32] = {
      587,   473,   370,   276,   190,   110,    35,   -35
 };
 
-static const int16_t *low_inv_quants[3] = { ff_g722_low_inv_quant6,
+static const int16_t * const low_inv_quants[3] = { ff_g722_low_inv_quant6,
                                                     low_inv_quant5,
                                             ff_g722_low_inv_quant4 };
 
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index aa9c30a..d38765e 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -118,8 +118,8 @@ static uint8_t requant_tab[8][128];
  */
 static av_cold void build_requant_tab(void)
 {
-    static int8_t offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 };
-    static int8_t deltas [8] = { 0, 1, 0,  4,  4, 1, 0, 1 };
+    static const int8_t offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 };
+    static const int8_t deltas [8] = { 0, 1, 0,  4,  4, 1, 0, 1 };
 
     int i, j, step;
 
diff --git a/libavcodec/indeo4data.h b/libavcodec/indeo4data.h
index d96ee98..efc5a65 100644
--- a/libavcodec/indeo4data.h
+++ b/libavcodec/indeo4data.h
@@ -61,7 +61,7 @@ static const uint8_t ivi4_horizontal_scan_4x4[16] = {
     0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
 };
 
-static const uint8_t *scan_index_to_tab[15] = {
+static const uint8_t * const scan_index_to_tab[15] = {
     // for 8x8 transforms
     ff_zigzag_direct,
     ivi4_alternate_scan_8x8,
diff --git a/libavcodec/mips/aaccoder_mips.c b/libavcodec/mips/aaccoder_mips.c
index d6210d1..8595913 100644
--- a/libavcodec/mips/aaccoder_mips.c
+++ b/libavcodec/mips/aaccoder_mips.c
@@ -81,7 +81,7 @@ static const uint8_t run_value_bits_short[16] = {
     3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9
 };
 
-static const uint8_t *run_value_bits[2] = {
+static const uint8_t * const run_value_bits[2] = {
     run_value_bits_long, run_value_bits_short
 };
 
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index 5d91e94..1b8f454 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -41,7 +41,7 @@ static av_cold int mov_text_encode_init(AVCodecContext *avctx)
      * For now, we'll use a fixed default style. When we add styling
      * support, this will be generated from the ASS style.
      */
-    static uint8_t text_sample_entry[] = {
+    static const uint8_t text_sample_entry[] = {
         0x00, 0x00, 0x00, 0x00, // uint32_t displayFlags
         0x01,                   // int8_t horizontal-justification
         0xFF,                   // int8_t vertical-justification
diff --git a/libavcodec/ppc/fdctdsp.c b/libavcodec/ppc/fdctdsp.c
index c3ebe0d..f2efc5d 100644
--- a/libavcodec/ppc/fdctdsp.c
+++ b/libavcodec/ppc/fdctdsp.c
@@ -59,7 +59,7 @@
 #define WA (SQRT_2 * (-C3 - C5))
 #define WB (SQRT_2 *  (C5 - C3))
 
-static vector float fdctconsts[3] = {
+static const vector float fdctconsts[3] = {
     { W0, W1, W2, W3 },
     { W4, W5, W6, W7 },
     { W8, W9, WA, WB }
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 17260a0..4cb9485 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -139,7 +139,7 @@ const float ff_pow_0_5[] = {
     1.0/(1 << 13), 1.0/(1 << 14), 1.0/(1 << 15), 1.0/(1 << 16)
 };
 
-static void dequant(float *out, const int *idx, const float *cbs[])
+static void dequant(float *out, const int *idx, const float * const cbs[])
 {
     int i;
     int stride  = 2;
diff --git a/libavcodec/siprdata.h b/libavcodec/siprdata.h
index ed804ee..0dbc113 100644
--- a/libavcodec/siprdata.h
+++ b/libavcodec/siprdata.h
@@ -206,7 +206,7 @@ static const float lsf_cb5[32][2] = {
     { 0.150514,  0.034366}, { 0.186092, -0.069272}
 };
 
-static const float *lsf_codebooks[] = {
+static const float * const lsf_codebooks[] = {
     lsf_cb1[0], lsf_cb2[0], lsf_cb3[0], lsf_cb4[0], lsf_cb5[0]
 };
 
diff --git a/libavcodec/wavpackenc.h b/libavcodec/wavpackenc.h
index 7a482ce..9dd2a01 100644
--- a/libavcodec/wavpackenc.h
+++ b/libavcodec/wavpackenc.h
@@ -637,7 +637,7 @@ static const WavPackDecorrSpec very_high_specs[] = {
  { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } },
 };
 
-static const WavPackDecorrSpec *decorr_filters[] = {
+static const WavPackDecorrSpec * const decorr_filters[] = {
     &fast_specs[0], &default_specs[0], &high_specs[0], &very_high_specs[0],
 };
 
diff --git a/libavcodec/x86/mlpdsp.c b/libavcodec/x86/mlpdsp.c
index b473625..f090fd7 100644
--- a/libavcodec/x86/mlpdsp.c
+++ b/libavcodec/x86/mlpdsp.c
@@ -44,12 +44,12 @@ extern char ff_mlp_iirorder_2;
 extern char ff_mlp_iirorder_1;
 extern char ff_mlp_iirorder_0;
 
-static const void *firtable[9] = { &ff_mlp_firorder_0, &ff_mlp_firorder_1,
+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 };
-static const void *iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
+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 };
 
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c
index 3218abd..7668d0b 100644
--- a/libavcodec/x86/videodsp_init.c
+++ b/libavcodec/x86/videodsp_init.c
@@ -61,7 +61,7 @@ extern emu_edge_vfix_func ff_emu_edge_vfix20_mmx;
 extern emu_edge_vfix_func ff_emu_edge_vfix21_mmx;
 extern emu_edge_vfix_func ff_emu_edge_vfix22_mmx;
 #if ARCH_X86_32
-static emu_edge_vfix_func *vfixtbl_mmx[22] = {
+static emu_edge_vfix_func * const vfixtbl_mmx[22] = {
     &ff_emu_edge_vfix1_mmx,  &ff_emu_edge_vfix2_mmx,  &ff_emu_edge_vfix3_mmx,
     &ff_emu_edge_vfix4_mmx,  &ff_emu_edge_vfix5_mmx,  &ff_emu_edge_vfix6_mmx,
     &ff_emu_edge_vfix7_mmx,  &ff_emu_edge_vfix8_mmx,  &ff_emu_edge_vfix9_mmx,
@@ -80,7 +80,7 @@ extern emu_edge_vfix_func ff_emu_edge_vfix19_sse;
 extern emu_edge_vfix_func ff_emu_edge_vfix20_sse;
 extern emu_edge_vfix_func ff_emu_edge_vfix21_sse;
 extern emu_edge_vfix_func ff_emu_edge_vfix22_sse;
-static emu_edge_vfix_func *vfixtbl_sse[22] = {
+static emu_edge_vfix_func * const vfixtbl_sse[22] = {
     ff_emu_edge_vfix1_mmx,  ff_emu_edge_vfix2_mmx,  ff_emu_edge_vfix3_mmx,
     ff_emu_edge_vfix4_mmx,  ff_emu_edge_vfix5_mmx,  ff_emu_edge_vfix6_mmx,
     ff_emu_edge_vfix7_mmx,  ff_emu_edge_vfix8_mmx,  ff_emu_edge_vfix9_mmx,
@@ -109,7 +109,7 @@ extern emu_edge_hfix_func ff_emu_edge_hfix18_mmx;
 extern emu_edge_hfix_func ff_emu_edge_hfix20_mmx;
 extern emu_edge_hfix_func ff_emu_edge_hfix22_mmx;
 #if ARCH_X86_32
-static emu_edge_hfix_func *hfixtbl_mmx[11] = {
+static emu_edge_hfix_func * const hfixtbl_mmx[11] = {
     ff_emu_edge_hfix2_mmx,  ff_emu_edge_hfix4_mmx,  ff_emu_edge_hfix6_mmx,
     ff_emu_edge_hfix8_mmx,  ff_emu_edge_hfix10_mmx, ff_emu_edge_hfix12_mmx,
     ff_emu_edge_hfix14_mmx, ff_emu_edge_hfix16_mmx, ff_emu_edge_hfix18_mmx,
@@ -121,7 +121,7 @@ extern emu_edge_hfix_func ff_emu_edge_hfix16_sse2;
 extern emu_edge_hfix_func ff_emu_edge_hfix18_sse2;
 extern emu_edge_hfix_func ff_emu_edge_hfix20_sse2;
 extern emu_edge_hfix_func ff_emu_edge_hfix22_sse2;
-static emu_edge_hfix_func *hfixtbl_sse2[11] = {
+static emu_edge_hfix_func * const hfixtbl_sse2[11] = {
     ff_emu_edge_hfix2_mmx,  ff_emu_edge_hfix4_mmx,  ff_emu_edge_hfix6_mmx,
     ff_emu_edge_hfix8_mmx,  ff_emu_edge_hfix10_mmx, ff_emu_edge_hfix12_mmx,
     ff_emu_edge_hfix14_mmx, ff_emu_edge_hfix16_sse2, ff_emu_edge_hfix18_sse2,
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 52d090c..6c5a834 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -80,7 +80,7 @@ typedef struct VideoData {
 #define VIDEO_FORMAT NTSC
 #endif
 
-static int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,
+static const int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,
     METEOR_DEV3, METEOR_DEV_SVIDEO };
 
 uint8_t *video_buf;
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index b5f97e2..5f5b800 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -164,7 +164,7 @@ typedef struct OpenGLVertexInfo
 } OpenGLVertexInfo;
 
 /* defines 2 triangles to display */
-static GLushort g_index[6] =
+static const GLushort g_index[6] =
 {
     0, 1, 2,
     0, 3, 2,
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index e06c3b3..9900d22 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -38,7 +38,7 @@
 #include "internal.h"
 #include "af_volume.h"
 
-static const char *precision_str[] = {
+static const char * const precision_str[] = {
     "fixed", "float", "double"
 };
 
diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c
index 2c53e8c..188ce91 100644
--- a/libavfilter/f_perms.c
+++ b/libavfilter/f_perms.c
@@ -72,7 +72,7 @@ static av_cold int init(AVFilterContext *ctx)
 }
 
 enum perm                        {  RO,   RW  };
-static const char *perm_str[2] = { "RO", "RW" };
+static const char * const perm_str[2] = { "RO", "RW" };
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 {
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 91ca057..df78391 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -158,7 +158,7 @@ static void calc_coefficients(AVFilterContext *ctx)
     }
 }
 
-static const char *color_modes[] = {"bt709", "fcc", "bt601", "smpte240m"};
+static const char * const color_modes[] = {"bt709", "fcc", "bt601", "smpte240m"};
 
 static av_cold int init(AVFilterContext *ctx)
 {
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index b7a295f..29cdfbb 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -272,7 +272,7 @@ struct ft_error
 {
     int err;
     const char *err_msg;
-} static ft_errors[] =
+} static const ft_errors[] =
 #include FT_ERRORS_H
 
 #define FT_ERRMSG(e) ft_errors[e].err_msg
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 1d9240c..80d99bd 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -76,7 +76,7 @@ enum EOFAction {
     EOF_ACTION_PASS
 };
 
-static const char *eof_action_str[] = {
+static const char * const eof_action_str[] = {
     "repeat", "endall", "pass"
 };
 
diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 7e5b12b..8dec742 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -38,7 +38,7 @@
 
 #include <float.h>
 
-static const char *var_names[] = {
+static const char * const var_names[] = {
     "in_w" , "iw",  ///< width of the input video
     "in_h" , "ih",  ///< height of the input video
     "out_w", "ow",  ///< width of the input video
@@ -130,7 +130,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 
 static int query_formats(AVFilterContext *ctx)
 {
-    static enum PixelFormat pix_fmts[] = {
+    static const enum PixelFormat pix_fmts[] = {
         AV_PIX_FMT_GBRP,   AV_PIX_FMT_GBRAP,
         AV_PIX_FMT_ARGB,   AV_PIX_FMT_RGBA,
         AV_PIX_FMT_ABGR,   AV_PIX_FMT_BGRA,
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index 558e509..4fa1174 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -254,7 +254,7 @@ static const AVOption subtitles_options[] = {
     {NULL},
 };
 
-static const char *font_mimetypes[] = {
+static const char * const font_mimetypes[] = {
     "application/x-truetype-font",
     "application/vnd.ms-opentype",
     "application/x-font-ttf",
diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c
index 3f00dbf..158a630 100644
--- a/libavformat/libmodplug.c
+++ b/libavformat/libmodplug.c
@@ -60,7 +60,7 @@ typedef struct ModPlugContext {
     AVExpr *expr;         ///< parsed color eval expression
 } ModPlugContext;
 
-static const char *var_names[] = {
+static const char * const var_names[] = {
     "x", "y",
     "w", "h",
     "t",
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index e7b5221..3b91ed7 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -344,7 +344,7 @@ static const struct MovChannelLayoutMap mov_ch_layout_map_9ch[] = {
     { 0, 0 },
 };
 
-static const struct MovChannelLayoutMap *mov_ch_layout_map[] = {
+static const struct MovChannelLayoutMap * const mov_ch_layout_map[] = {
     mov_ch_layout_map_misc,
     mov_ch_layout_map_1ch,
     mov_ch_layout_map_2ch,
diff --git a/libavformat/rtspcodes.h b/libavformat/rtspcodes.h
index d4f762b..d4ae0a8 100644
--- a/libavformat/rtspcodes.h
+++ b/libavformat/rtspcodes.h
@@ -74,7 +74,7 @@ RTSP_STATUS_VERSION              =505,
 RTSP_STATUS_UNSUPPORTED_OPTION   =551,
 };
 
-static const av_unused char *rtsp_status_strings[] = {
+static const av_unused char * const rtsp_status_strings[] = {
 [RTSP_STATUS_CONTINUE]               ="Continue",
 [RTSP_STATUS_OK]                     ="OK",
 [RTSP_STATUS_CREATED]                ="Created",
diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c
index 989891d..9df1865 100644
--- a/libavresample/audio_mix.c
+++ b/libavresample/audio_mix.c
@@ -28,7 +28,7 @@
 #include "audio_data.h"
 #include "audio_mix.h"
 
-static const char *coeff_type_names[] = { "q8", "q15", "flt" };
+static const char * const coeff_type_names[] = { "q8", "q15", "flt" };
 
 struct AudioMix {
     AVAudioResampleContext *avr;
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 4dc8e4e..4ee0630 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -72,7 +72,7 @@ int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
 
 const char *av_get_colorspace_name(enum AVColorSpace val)
 {
-    static const char *name[] = {
+    static const char * const name[] = {
         [AVCOL_SPC_RGB]       = "GBR",
         [AVCOL_SPC_BT709]     = "bt709",
         [AVCOL_SPC_FCC]       = "fcc",
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 794cd30..a557fb8 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -154,7 +154,7 @@ static const struct PPFilter filters[]=
     {NULL, NULL,0,0,0,0} //End Marker
 };
 
-static const char *replaceTable[]=
+static const char * const replaceTable[]=
 {
     "default",      "hb:a,vb:a,dr:a",
     "de",           "hb:a,vb:a,dr:a",



More information about the ffmpeg-cvslog mailing list