diff options
author | wm4 <wm4@nowhere> | 2014-06-10 23:56:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-11 00:39:14 +0200 |
commit | 99f5fef0ea5671d41fb7b737fbc3e4236542a757 (patch) | |
tree | c01912d00e64a7783cb7109b3d1e2dc2390b3a7d /audio/chmap.c | |
parent | ad4b7a8c967f9d13ceeaffff25d156d848b68445 (diff) | |
download | mpv-99f5fef0ea5671d41fb7b737fbc3e4236542a757.tar.bz2 mpv-99f5fef0ea5671d41fb7b737fbc3e4236542a757.tar.xz |
Add more const
While I'm not very fond of "const", it's important for declarations
(it decides whether a symbol is emitted in a read-only or read/write
section). Fix all these cases, so we have writeable global data only
when we really need.
Diffstat (limited to 'audio/chmap.c')
-rw-r--r-- | audio/chmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/chmap.c b/audio/chmap.c index 9a18512e21..316ca35c94 100644 --- a/audio/chmap.c +++ b/audio/chmap.c @@ -23,7 +23,7 @@ // Names taken from libavutil/channel_layout.c (Not accessible by API.) // Use of these names is hard-coded in some places (e.g. ao_alsa.c) -static const char *speaker_names[MP_SPEAKER_ID_COUNT][2] = { +static const char *const speaker_names[MP_SPEAKER_ID_COUNT][2] = { [MP_SPEAKER_ID_FL] = {"fl", "front left"}, [MP_SPEAKER_ID_FR] = {"fr", "front right"}, [MP_SPEAKER_ID_FC] = {"fc", "front center"}, @@ -53,7 +53,7 @@ static const char *speaker_names[MP_SPEAKER_ID_COUNT][2] = { // Names taken from libavutil/channel_layout.c (Not accessible by API.) // Channel order corresponds to lavc/waveex, except for the alsa entries. -static const char *std_layout_names[][2] = { +static const char *const std_layout_names[][2] = { {"empty", ""}, // not in lavc {"mono", "fc"}, {"stereo", "fl-fr"}, @@ -105,7 +105,7 @@ static const struct mp_chmap default_layouts[MP_NUM_CHANNELS + 1] = { // channels. 3 and 7 channels were likely undefined (no ALSA support). // I'm not sure about the 4 channel case: ALSA uses "quad", while the ffmpeg // default layout is "4.0". -static const char *mplayer_layouts[MP_NUM_CHANNELS + 1] = { +static const char *const mplayer_layouts[MP_NUM_CHANNELS + 1] = { [1] = "mono", [2] = "stereo", [4] = "quad", |