]> git.sesse.net Git - ffmpeg/commitdiff
Mark mutable static data const where appropriate.
authorAlex Converse <alex.converse@gmail.com>
Mon, 20 Feb 2012 08:42:33 +0000 (00:42 -0800)
committerAlex Converse <alex.converse@gmail.com>
Tue, 21 Feb 2012 17:47:07 +0000 (09:47 -0800)
18 files changed:
avprobe.c
avserver.c
libavcodec/aacdec.c
libavcodec/libvpxenc.c
libavcodec/libxvid_rc.c
libavfilter/vf_boxblur.c
libavfilter/vf_crop.c
libavfilter/vf_drawtext.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vf_settb.c
libavfilter/vsrc_nullsrc.c
libavformat/matroskadec.c
libavutil/eval.c

index 799b32522f61e2767b54225e7cdd7c560f0cb716..fe2b6e28604c1c788ffe504bb864c36a8dbd7a3e 100644 (file)
--- a/avprobe.c
+++ b/avprobe.c
@@ -48,13 +48,13 @@ static const OptionDef options[];
 static const char *input_filename;
 static AVInputFormat *iformat = NULL;
 
-static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
-static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P"  };
+static const char *const binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
+static const char *const decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P"  };
 
-static const char *unit_second_str          = "s"    ;
-static const char *unit_hertz_str           = "Hz"   ;
-static const char *unit_byte_str            = "byte" ;
-static const char *unit_bit_per_second_str  = "bit/s";
+static const char unit_second_str[]         = "s"    ;
+static const char unit_hertz_str[]          = "Hz"   ;
+static const char unit_byte_str[]           = "byte" ;
+static const char unit_bit_per_second_str[] = "bit/s";
 
 void exit_program(int ret)
 {
index f3ac319ef93ecfe386e881f41095a947eb2879be..4df8a3e8a428519c49a135ccec0e463a674f8642 100644 (file)
@@ -1865,7 +1865,7 @@ static int http_parse_request(HTTPContext *c)
 
 static void fmt_bytecount(AVIOContext *pb, int64_t count)
 {
-    static const char *suffix = " kMGTP";
+    static const char suffix[] = " kMGTP";
     const char *s;
 
     for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++);
index f9cfb764a2813795bc6d31e00f24f2b91cb4acee..dd9eefca076c26caca875d6f03f02536a29a94cb 100644 (file)
@@ -1015,7 +1015,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb,
     int offset[3] = { global_gain, global_gain - 90, 0 };
     int clipped_offset;
     int noise_flag = 1;
-    static const char *sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" };
+    static const char *const sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" };
     for (g = 0; g < ics->num_window_groups; g++) {
         for (i = 0; i < ics->max_sfb;) {
             int run_end = band_type_run_end[idx];
index 64ff2c1eaa02664f07bfcedaa5fcf27aaccd3779..bba79733ed7f9d2f08b97c77a167b03230ea8d4c 100644 (file)
@@ -66,7 +66,7 @@ typedef struct VP8EncoderContext {
 } VP8Context;
 
 /** String mappings for enum vp8e_enc_control_id */
-static const char *ctlidstr[] = {
+static const char *const ctlidstr[] = {
     [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
     [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
     [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
index 2386ce3cc63c15d394a363e99ac38fd947f3d74f..7a0e60dd09c2ae3c1962f0971eab2a214eb9d017 100644 (file)
@@ -47,7 +47,7 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
     }
 
     for(i=0; i<s->rc_context.num_entries; i++){
-        static const char *frame_types = " ipbs";
+        static const char frame_types[] = " ipbs";
         char tmp[256];
         RateControlEntry *rce;
 
index a314f5c2c1b08c43ccff6e83bee904110e97567f..fa739de48d0ee70e876f165d9dfc2198a67bddef 100644 (file)
@@ -30,7 +30,7 @@
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "w",
     "h",
     "cw",
index cb01bd41cb53391bf8893bba0fcc05a54f89f2af..d3b5a090605ef21ca99d40d1524507579ebafd51 100644 (file)
@@ -32,7 +32,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/mathematics.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
index 5b794dc5453e5d2a48a80df2860bdecdb72c07ef..4846716fe097fc5ccff7c43209f7166fb1010ea9 100644 (file)
@@ -49,7 +49,7 @@
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
@@ -64,8 +64,8 @@ static const char *var_names[] = {
     NULL
 };
 
-static const char *fun2_names[] = {
-    "rand",
+static const char *const fun2_names[] = {
+    "rand"
 };
 
 static double drand(void *opaque, double min, double max)
index 7f3e91394561b3d60267b2ceb6df5254d22f2903..b4950f4e36007ac3421450bfc963367a592decc1 100644 (file)
@@ -31,7 +31,7 @@
 #include "avfilter.h"
 #include "internal.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
index 39b237523587c30bf8cc5140e131eabb84ec8a12..2115141b0e2bb38b882a010bef965df6296dc5a8 100644 (file)
@@ -33,7 +33,7 @@
 #include "libavutil/mathematics.h"
 #include "internal.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
index 9ba91ed21cc55625399618f623f2cf55fc009ba7..fdadb1a7c73c2a51bd0152e434464eecfb2c7b06 100644 (file)
@@ -35,7 +35,7 @@
 #include "libavutil/mathematics.h"
 #include "drawutils.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "PI",
     "PHI",
     "E",
index 37a6f8e38600a9dbc5928ecc13e3d1307cbd1d39..46009a7daab82adefc460ed1ecdf98587e0aca76 100644 (file)
@@ -30,7 +30,7 @@
 #include "libavutil/pixdesc.h"
 #include "libswscale/swscale.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "PI",
     "PHI",
     "E",
index 0ec443aec5223b9671dd9ac2b95e16ff0d19e34b..13ec0407d5011ed1f4ca35af500bdcb3a645306d 100644 (file)
@@ -28,7 +28,7 @@
 #include "libavutil/mathematics.h"
 #include "avfilter.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",                 ///< Euler number
     "PHI",               ///< golden ratio
     "PI",                ///< greek pi
index f2650923d0faf80b57780a638b58ac725c14a2f7..b49ca5eb57621d1715a7d910f875172d10b29124 100644 (file)
@@ -30,7 +30,7 @@
 #include "libavutil/mathematics.h"
 #include "avfilter.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",           ///< Euler number
     "INTERLACED",  ///< tell if the current frame is interlaced
     "N",           ///< frame number (starting at zero)
index eeb4353915fc0d4d094b3ea0a3a074f4974e2298..49f7a57d723354474bb2056e89a569756ca200c4 100644 (file)
@@ -30,7 +30,7 @@
 #include "avfilter.h"
 #include "internal.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
index dfd56fa4951123fe55606747374e479a8a243869..4f9dd793468aee6d61742fed71578d8df34c79ea 100644 (file)
@@ -27,7 +27,7 @@
 #include "libavutil/parseutils.h"
 #include "avfilter.h"
 
-static const char *var_names[] = {
+static const char *const var_names[] = {
     "E",
     "PHI",
     "PI",
index 31b40a8386e9e70117b2034f7c31d41afa829abb..4d02488b19787b2caf2c0a9fda76bcd0eef18b68 100644 (file)
@@ -514,7 +514,7 @@ static EbmlSyntax matroska_clusters[] = {
     { 0 }
 };
 
-static const char *matroska_doctypes[] = { "matroska", "webm" };
+static const char *const matroska_doctypes[] = { "matroska", "webm" };
 
 /*
  * Return: Whether we reached the end of a level in the hierarchy or not.
index 9941ed7060813aabde5fe9ffe47b809d2100fba4..4d8ebf4f6e07f1c93c9f10d1a6cb7dc87cc06afe 100644 (file)
@@ -543,13 +543,13 @@ int av_expr_parse_and_eval(double *d, const char *s,
 #undef printf
 #include <string.h>
 
-static double const_values[] = {
+static const double const_values[] = {
     M_PI,
     M_E,
     0
 };
 
-static const char *const_names[] = {
+static const char *const const_names[] = {
     "PI",
     "E",
     0