31 int max_frames = 0, first_frames = 0;
40 for (; buf < end; buf = buf2 + 1) {
43 for (frames = 0; buf2 < end; frames++) {
44 uint32_t header =
AV_RB16(buf2);
45 if ((header & 0xFFF6) != 0xFFF0) {
55 fsize = (
AV_RB32(buf2 + 3) >> 13) & 0x1FFF;
60 max_frames =
FFMAX(max_frames, frames);
62 first_frames = frames;
65 if (first_frames >= 3)
67 else if (max_frames > 100)
69 else if (max_frames >= 3)
71 else if (max_frames >= 1)
105 .mime_type =
"audio/aac,audio/aacp,audio/x-aac",
void ff_id3v1_read(AVFormatContext *s)
Read an ID3v1 tag.
enum AVStreamParseType need_parsing
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVCodecContext * codec
Codec context associated with this stream.
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.
enum AVMediaType codec_type
This structure contains the data a format has to probe a file.
struct AVInputFormat * iformat
The input container format.