aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3tab.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-06-27 14:43:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-09-22 00:12:27 +0200
commitfe315feab59f2f99765547096357826bc9454d24 (patch)
tree68858786dc19b3219b050f4ee0c27d0acfa0ffba /libavcodec/ac3tab.c
parenta068594248b784c97d4423812379ca03c6ce5c54 (diff)
downloadffmpeg-fe315feab59f2f99765547096357826bc9454d24.tar.gz
avcodec/eac3dec: Check that channel_map does not contain more than EAC3_MAX_CHANNELS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ac3tab.c')
-rw-r--r--libavcodec/ac3tab.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c
index d62d8bfbf5..bd88f32d92 100644
--- a/libavcodec/ac3tab.c
+++ b/libavcodec/ac3tab.c
@@ -314,3 +314,21 @@ const uint16_t ff_eac3_default_chmap[8] = {
AC3_CHMAP_L | AC3_CHMAP_R | AC3_CHMAP_L_SUR | AC3_CHMAP_R_SUR,
AC3_CHMAP_L | AC3_CHMAP_C | AC3_CHMAP_R | AC3_CHMAP_L_SUR | AC3_CHMAP_R_SUR
};
+const uint64_t ff_eac3_custom_channel_map_locations[16][2] = {
+ { 1, AV_CH_FRONT_LEFT },
+ { 1, AV_CH_FRONT_CENTER },
+ { 1, AV_CH_FRONT_RIGHT },
+ { 1, AV_CH_SIDE_LEFT },
+ { 1, AV_CH_SIDE_RIGHT },
+ { 0, AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER },
+ { 0, AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT },
+ { 0, AV_CH_BACK_CENTER },
+ { 0, AV_CH_TOP_CENTER },
+ { 0, AV_CH_SURROUND_DIRECT_LEFT | AV_CH_SURROUND_DIRECT_RIGHT },
+ { 0, AV_CH_WIDE_LEFT | AV_CH_WIDE_RIGHT },
+ { 0, AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT},
+ { 0, AV_CH_TOP_FRONT_CENTER },
+ { 0, AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT },
+ { 0, AV_CH_LOW_FREQUENCY_2 },
+ { 1, AV_CH_LOW_FREQUENCY },
+};