Mercurial > libavformat.hg
changeset 3769:93d4898d9b6e libavformat
Mark several libavformat arrays const
author | reimar |
---|---|
date | Sun, 24 Aug 2008 17:24:34 +0000 |
parents | 185fc71a641c |
children | 6c71b789c69e |
files | img2.c mmf.c oma.c utils.c |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 },
--- 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) {
--- 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;
--- 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", };