}
} else if (vr_type == 2) {
- unsigned voffs_div = FASTDIV(voffset << 1, ch <<1);
+ unsigned voffs_div = ch == 1 ? voffset : FASTDIV(voffset, ch);
unsigned voffs_mod = voffset - voffs_div * ch;
for (k = 0; k < step; ++k) {
vc->first_frame = 0;
}
-AVCodec ff_vorbis_decoder = {
+const AVCodec ff_vorbis_decoder = {
.name = "vorbis",
.long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
.type = AVMEDIA_TYPE_AUDIO,
.close = vorbis_decode_close,
.decode = vorbis_decode_frame,
.flush = vorbis_decode_flush,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.channel_layouts = ff_vorbis_channel_layouts,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,