diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-08-24 17:24:34 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-08-24 17:24:34 +0000 |
commit | aecf157ed0c193b2f871102ccbe2bc39877dfc93 (patch) | |
tree | fa040353446aba13568d3d4d398c4fdbc65f269b | |
parent | 7b571fd7a42ebc7fd083665105807193bd54ecc2 (diff) | |
download | ffmpeg-aecf157ed0c193b2f871102ccbe2bc39877dfc93.tar.gz |
Mark several libavformat arrays const
Originally committed as revision 14950 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/img2.c | 2 | ||||
-rw-r--r-- | libavformat/mmf.c | 2 | ||||
-rw-r--r-- | libavformat/oma.c | 4 | ||||
-rw-r--r-- | libavformat/utils.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 2e570dd87f..d3b7200ae9 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -72,7 +72,7 @@ static const IdStrMap img_tags[] = { { CODEC_ID_NONE , NULL} }; -static int sizes[][2] = { +static const int sizes[][2] = { { 640, 480 }, { 720, 480 }, { 720, 576 }, diff --git a/libavformat/mmf.c b/libavformat/mmf.c index a0185c3ad4..04bf871fa5 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -27,7 +27,7 @@ typedef struct { offset_t data_size; } MMFContext; -static int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 }; +static const int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 }; static int mmf_rate(int code) { diff --git a/libavformat/oma.c b/libavformat/oma.c index de632ff27b..161d1a0867 100644 --- a/libavformat/oma.c +++ b/libavformat/oma.c @@ -89,7 +89,7 @@ static int oma_read_header(AVFormatContext *s, if (ret != EA3_HEADER_SIZE) return -1; - if (memcmp(buf, (uint8_t[]){'E', 'A', '3'},3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) { + if (memcmp(buf, (const uint8_t[]){'E', 'A', '3'},3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) { av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n"); return -1; } @@ -177,7 +177,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) static int oma_read_probe(AVProbeData *p) { - if (!memcmp(p->buf, (uint8_t[]){'e', 'a', '3', 3, 0},5)) + if (!memcmp(p->buf, (const uint8_t[]){'e', 'a', '3', 3, 0},5)) return AVPROBE_SCORE_MAX; else return 0; diff --git a/libavformat/utils.c b/libavformat/utils.c index 9a8aaeca7f..17e06d5108 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1965,7 +1965,7 @@ static void compute_chapters_end(AVFormatContext *s) #define MAX_STD_TIMEBASES (60*12+5) static int get_std_framerate(int i){ if(i<60*12) return i*1001; - else return ((int[]){24,30,60,12,15})[i-60*12]*1000*12; + else return ((const int[]){24,30,60,12,15})[i-60*12]*1000*12; } /* @@ -2869,11 +2869,11 @@ int64_t parse_date(const char *datestr, int duration) int64_t t; struct tm dt; int i; - static const char *date_fmt[] = { + static const char * const date_fmt[] = { "%Y-%m-%d", "%Y%m%d", }; - static const char *time_fmt[] = { + static const char * const time_fmt[] = { "%H:%M:%S", "%H%M%S", }; |