32 int max_frames = 0, first_frames = 0;
41 for (; buf <
end; buf = buf2 + 1) {
44 for (frames = 0; buf2 <
end; frames++) {
46 if ((header & 0xFFF6) != 0xFFF0) {
56 fsize = (
AV_RB32(buf2 + 3) >> 13) & 0x1FFF;
59 fsize =
FFMIN(fsize, end - buf2);
62 max_frames =
FFMAX(max_frames, frames);
67 if (first_frames >= 3)
69 else if (max_frames > 100)
71 else if (max_frames >= 3)
73 else if (max_frames >= 1)
113 .mime_type =
"audio/aac,audio/aacp,audio/x-aac",
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
void ff_id3v1_read(AVFormatContext *s)
Read an ID3v1 tag.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
static av_cold int end(AVCodecContext *avctx)
enum AVStreamParseType need_parsing
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static const uint8_t header[24]
AVDictionary * metadata
Metadata that applies to the whole file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
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.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
struct AVInputFormat * iformat
The input container format.
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
AVCodecParameters * codecpar
static int64_t fsize(FILE *f)