summaryrefslogtreecommitdiffstats
path: root/audio/chmap_sel.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-10 23:56:05 +0200
committerwm4 <wm4@nowhere>2014-06-11 00:39:14 +0200
commit99f5fef0ea5671d41fb7b737fbc3e4236542a757 (patch)
treec01912d00e64a7783cb7109b3d1e2dc2390b3a7d /audio/chmap_sel.c
parentad4b7a8c967f9d13ceeaffff25d156d848b68445 (diff)
downloadmpv-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_sel.c')
-rw-r--r--audio/chmap_sel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/chmap_sel.c b/audio/chmap_sel.c
index f71a868674..160f1ce5fa 100644
--- a/audio/chmap_sel.c
+++ b/audio/chmap_sel.c
@@ -21,7 +21,7 @@
#include "common/common.h"
#include "chmap_sel.h"
-static struct mp_chmap speaker_replacements[][2] = {
+static const struct mp_chmap speaker_replacements[][2] = {
// 5.1 <-> 5.1 (side)
{ MP_CHMAP2(SL, SR), MP_CHMAP2(BL, BR) },
// 7.1 <-> 7.1 (rear ext)
@@ -170,7 +170,7 @@ bool mp_chmap_sel_adjust(const struct mp_chmap_sel *s, struct mp_chmap *map)
}
for (int i = 0; i < MP_ARRAY_SIZE(speaker_replacements); i++) {
struct mp_chmap t = *map;
- struct mp_chmap *r = speaker_replacements[i];
+ struct mp_chmap *r = (struct mp_chmap *)speaker_replacements[i];
if (replace_speakers(&t, r) && test_layout(s, &t)) {
*map = t;
return true;