# HG changeset patch # User reimar # Date 1219598674 0 # Node ID 93d4898d9b6ebd1b8cc61718863cacca78c32954 # Parent 185fc71a641c2c1cfcde2a78a26bc3f1b70dbbad Mark several libavformat arrays const diff -r 185fc71a641c -r 93d4898d9b6e img2.c --- a/img2.c Sun Aug 24 17:19:46 2008 +0000 +++ b/img2.c Sun Aug 24 17:24:34 2008 +0000 @@ -72,7 +72,7 @@ { CODEC_ID_NONE , NULL} }; -static int sizes[][2] = { +static const int sizes[][2] = { { 640, 480 }, { 720, 480 }, { 720, 576 }, diff -r 185fc71a641c -r 93d4898d9b6e mmf.c --- a/mmf.c Sun Aug 24 17:19:46 2008 +0000 +++ b/mmf.c Sun Aug 24 17:24:34 2008 +0000 @@ -27,7 +27,7 @@ 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 -r 185fc71a641c -r 93d4898d9b6e oma.c --- a/oma.c Sun Aug 24 17:19:46 2008 +0000 +++ b/oma.c Sun Aug 24 17:24:34 2008 +0000 @@ -89,7 +89,7 @@ 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_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 -r 185fc71a641c -r 93d4898d9b6e utils.c --- a/utils.c Sun Aug 24 17:19:46 2008 +0000 +++ b/utils.c Sun Aug 24 17:24:34 2008 +0000 @@ -1965,7 +1965,7 @@ #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 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", };