summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-03 10:09:36 +0200
committerAnton Khirnov <anton@khirnov.net>2017-02-01 10:42:59 +0100
commitfd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3 (patch)
treee9e285e1f4634de77b1657420b5121d109bed249 /libavformat
parentb420a27e74750b60d2e064236afb10be06a38ace (diff)
Mark some arrays that never change as const.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/hls.c4
-rw-r--r--libavformat/id3v2.c2
-rw-r--r--libavformat/id3v2.h2
-rw-r--r--libavformat/mov_chan.c2
-rw-r--r--libavformat/movenc.c2
-rw-r--r--libavformat/mxfdec.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 3b8e28038d..c9da4e30ec 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -477,8 +477,8 @@ reload:
static int save_avio_options(AVFormatContext *s)
{
HLSContext *c = s->priv_data;
- static const char *opts[] = { "headers", "user_agent", NULL };
- const char **opt = opts;
+ static const char * const opts[] = { "headers", "user_agent", NULL };
+ const char * const *opt = opts;
uint8_t *buf;
int ret = 0;
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 3f43b4aa8b..643891c082 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -86,7 +86,7 @@ const char ff_id3v2_3_tags[][4] = {
{ 0 },
};
-const char *ff_id3v2_picture_types[21] = {
+const char * const ff_id3v2_picture_types[21] = {
"Other",
"32x32 pixels 'file icon'",
"Other file icon",
diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
index 7cb4296f11..2d65a4dcb4 100644
--- a/libavformat/id3v2.h
+++ b/libavformat/id3v2.h
@@ -158,6 +158,6 @@ extern const char ff_id3v2_3_tags[][4];
extern const CodecMime ff_id3v2_mime_tags[];
-extern const char *ff_id3v2_picture_types[21];
+extern const char * const ff_id3v2_picture_types[21];
#endif /* AVFORMAT_ID3V2_H */
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 1b05cdff4e..42decb1e81 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/movenc.c b/libavformat/movenc.c
index ac76dedca4..440370e259 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3529,7 +3529,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
if (par->codec_id == AV_CODEC_ID_AMR_NB) {
/* We must find out how many AMR blocks there are in one packet */
- static uint16_t packed_size[16] =
+ static const uint16_t packed_size[16] =
{13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
int len = 0;
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 1c7c280188..cf4931e731 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -981,7 +981,7 @@ static const MXFCodecUL mxf_data_essence_container_uls[] = {
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, AV_CODEC_ID_NONE },
};
-static const char* mxf_data_essence_descriptor[] = {
+static const char * const mxf_data_essence_descriptor[] = {
"vbi_vanc_smpte_436M",
};