30 int max_frames, first_frames = 0,
frames;
38 for(; buf <
end; buf++) {
39 if(buf > p->
buf && !(buf[0] == 0x0B && buf[1] == 0x77)
40 && !(buf[0] == 0x77 && buf[1] == 0x0B) )
50 if(!memcmp(buf2,
"\x1\x10\0\0\0\0\0\0", 8)) {
55 if (buf[0] == 0x77 && buf[1] == 0x0B) {
67 if(buf2 + frame_size > end)
69 if (buf[0] == 0x77 && buf[1] == 0x0B) {
81 if (bitstream_id > 10)
89 if(codec_id != expected_codec_id)
return 0;
95 else if(max_frames>=1)
return 1;
99 #if CONFIG_AC3_DEMUXER 108 .read_probe = ac3_probe,
117 #if CONFIG_EAC3_DEMUXER 126 .read_probe = eac3_probe,
130 .extensions =
"eac3",
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_cold int end(AVCodecContext *avctx)
Public header for CRC hash function implementation.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
simple assert() macros that are a bit more flexible than ISO C assert().
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
This structure contains the data a format has to probe a file.
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
int av_ac3_parse_header(const uint8_t *buf, size_t size, uint8_t *bitstream_id, uint16_t *frame_size)
Extract the bitstream ID and the frame size from AC-3 data.