35 const char *buf,
int *
offset,
41 switch (data_type & 0xff) {
104 #define SPDIF_MAX_OFFSET 16384
116 const uint8_t *expected_code = buf + 7;
119 int consecutive_codes = 0;
122 for (; buf < probe_end; buf++) {
123 state = (state << 8) | *buf;
129 if (buf == expected_code) {
130 if (++consecutive_codes >= 2)
133 consecutive_codes = 0;
143 &buf[5], &offset, codec)) {
144 if (buf + offset >= p_buf + buf_size)
146 expected_code = buf +
offset;
147 buf = expected_code - 7;
175 int pkt_size_bits,
offset, ret;
178 state = (state << 8) |
avio_r8(pb);
186 if (pkt_size_bits % 16)