49 if (memcmp(&buf[1],
"vorbis", 6)) {
54 if (!(buf[29] & 0x1)) {
71 int got_framing_bit, mode_count, got_mode_header, last_mode_count = 0;
86 if (memcmp(&buf[1],
"vorbis", 6)) {
96 for (i = 0; i < buf_size; i++)
97 rev_buf[i] = buf[buf_size - 1 - i];
107 if (!got_framing_bit) {
129 if (
get_bits(&gb0, 6) + 1 == mode_count) {
131 last_mode_count = mode_count;
134 if (!got_mode_header) {
143 if (last_mode_count > 2) {
145 "%d modes (either a false positive or a "
146 "sample from an unknown encoder)",
151 if (last_mode_count > 63) {
166 for (i = mode_count - 1; i >= 0; i--) {
187 header_start, header_len)) < 0) {
192 if ((ret =
parse_id_header(avctx, s, header_start[0], header_len[0])) < 0)
205 int buf_size,
int *
flags)
210 int mode, current_blocksize;
221 else if (buf[0] == 3)
246 duration = (previous_blocksize + current_blocksize) >> 2;
265 #if CONFIG_VORBIS_PARSER
267 const uint8_t **poutbuf,
int *poutbuf_size,
284 *poutbuf_size = buf_size;
291 .parser_parse = vorbis_parse,