.version = LIBAVUTIL_VERSION_INT,
};
+static const uint8_t vorbis_encoding_channel_layout_offsets[8][8] = {
+ { 0 },
+ { 0, 1 },
+ { 0, 2, 1 },
+ { 0, 1, 2, 3 },
+ { 0, 2, 1, 3, 4 },
+ { 0, 2, 1, 4, 5, 3 },
+ { 0, 2, 1, 5, 6, 4, 3 },
+ { 0, 2, 1, 6, 7, 4, 5, 3 },
+};
+
static int vorbis_error_to_averror(int ov_err)
{
switch (ov_err) {
buffer = vorbis_analysis_buffer(&s->vd, samples);
for (c = 0; c < channels; c++) {
int co = (channels > 8) ? c :
- ff_vorbis_encoding_channel_layout_offsets[channels - 1][c];
+ vorbis_encoding_channel_layout_offsets[channels - 1][c];
memcpy(buffer[c], frame->extended_data[co],
samples * sizeof(*buffer[c]));
}
return 0;
}
-AVCodec ff_libvorbis_encoder = {
+const AVCodec ff_libvorbis_encoder = {
.name = "libvorbis",
.long_name = NULL_IF_CONFIG_SMALL("libvorbis"),
.type = AVMEDIA_TYPE_AUDIO,