diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-07-03 10:09:36 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-02-01 10:42:59 +0100 |
commit | fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3 (patch) | |
tree | e9e285e1f4634de77b1657420b5121d109bed249 /libavutil | |
parent | b420a27e74750b60d2e064236afb10be06a38ace (diff) | |
download | ffmpeg-fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3.tar.gz |
Mark some arrays that never change as const.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext.c | 2 | ||||
-rw-r--r-- | libavutil/hwcontext_vaapi.c | 2 | ||||
-rw-r--r-- | libavutil/parseutils.c | 2 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 10 | ||||
-rw-r--r-- | libavutil/stereo3d.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 83f733e9f9..608da68727 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -28,7 +28,7 @@ #include "pixdesc.h" #include "pixfmt.h" -static const HWContextType *hw_table[] = { +static const HWContextType * const hw_table[] = { #if CONFIG_CUDA &ff_hwcontext_type_cuda, #endif diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index b2e212c1fe..f8719aaf0a 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -84,7 +84,7 @@ typedef struct VAAPIMapping { } // The map fourcc <-> pix_fmt isn't bijective because of the annoying U/V // plane swap cases. The frame handling below tries to hide these. -static struct { +static const struct { unsigned int fourcc; unsigned int rt_format; enum AVPixelFormat pix_fmt; diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index f4248114b5..d9d5839f67 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -152,7 +152,7 @@ typedef struct ColorEntry { uint8_t rgb_color[3]; ///< RGB values for the color } ColorEntry; -static ColorEntry color_table[] = { +static const ColorEntry color_table[] = { { "AliceBlue", { 0xF0, 0xF8, 0xFF } }, { "AntiqueWhite", { 0xFA, 0xEB, 0xD7 } }, { "Aqua", { 0x00, 0xFF, 0xFF } }, diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 2f1adf5d8d..d69eeea9de 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -1764,13 +1764,13 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { FF_ENABLE_DEPRECATION_WARNINGS #endif -static const char *color_range_names[] = { +static const char * const color_range_names[] = { [AVCOL_RANGE_UNSPECIFIED] = "unknown", [AVCOL_RANGE_MPEG] = "tv", [AVCOL_RANGE_JPEG] = "pc", }; -static const char *color_primaries_names[] = { +static const char * const color_primaries_names[] = { [AVCOL_PRI_RESERVED0] = "reserved", [AVCOL_PRI_BT709] = "bt709", [AVCOL_PRI_UNSPECIFIED] = "unknown", @@ -1787,7 +1787,7 @@ static const char *color_primaries_names[] = { [AVCOL_PRI_JEDEC_P22] = "jedec-p22", }; -static const char *color_transfer_names[] = { +static const char * const color_transfer_names[] = { [AVCOL_TRC_RESERVED0] = "reserved", [AVCOL_TRC_BT709] = "bt709", [AVCOL_TRC_UNSPECIFIED] = "unknown", @@ -1809,7 +1809,7 @@ static const char *color_transfer_names[] = { [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67", }; -static const char *color_space_names[] = { +static const char * const color_space_names[] = { [AVCOL_SPC_RGB] = "gbr", [AVCOL_SPC_BT709] = "bt709", [AVCOL_SPC_UNSPECIFIED] = "unknown", @@ -1824,7 +1824,7 @@ static const char *color_space_names[] = { [AVCOL_SPC_SMPTE2085] = "smpte2085", }; -static const char *chroma_location_names[] = { +static const char * const chroma_location_names[] = { [AVCHROMA_LOC_UNSPECIFIED] = "unspecified", [AVCHROMA_LOC_LEFT] = "left", [AVCHROMA_LOC_CENTER] = "center", diff --git a/libavutil/stereo3d.c b/libavutil/stereo3d.c index 0d72609cd0..5dc902e909 100644 --- a/libavutil/stereo3d.c +++ b/libavutil/stereo3d.c @@ -43,7 +43,7 @@ AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame) return (AVStereo3D *)side_data->data; } -static const char *stereo3d_type_names[] = { +static const char * const stereo3d_type_names[] = { [AV_STEREO3D_2D] = "2D", [AV_STEREO3D_SIDEBYSIDE] = "side by side", [AV_STEREO3D_TOPBOTTOM] = "top and bottom", |