34 const uint8_t *buf,
int buf_size)
49 if (memcmp(&buf[1],
"vorbis", 6)) {
54 if (!(buf[29] & 0x1)) {
66 const uint8_t *buf,
int buf_size)
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 "positive or a sample from an unknown encoder.\n",
150 if (last_mode_count > 63) {
165 for (i = mode_count - 1; i >= 0; i--) {
186 header_start, header_len)) < 0) {
191 if ((ret =
parse_id_header(avctx, s, header_start[0], header_len[0])) < 0)
209 int mode, current_blocksize;
229 duration = (previous_blocksize + current_blocksize) >> 2;
242 #if CONFIG_VORBIS_PARSER
244 const uint8_t **poutbuf,
int *poutbuf_size,
245 const uint8_t *buf,
int buf_size)
261 *poutbuf_size = buf_size;
268 .parser_parse = vorbis_parse,