23 #include "libavutil/intreadwrite.h"
32 int max_frames = 0, first_frames = 0;
41 for(; buf <
end; buf= buf2+1) {
44 for(frames = 0; buf2 <
end; frames++) {
45 uint32_t header =
AV_RB16(buf2);
46 if((header&0xFFF6) != 0xFFF0)
48 fsize = (
AV_RB32(buf2 + 3) >> 13) & 0x1FFF;
51 fsize =
FFMIN(fsize, end - buf2);
54 max_frames =
FFMAX(max_frames, frames);
61 else if(max_frames>=1)
return 1;
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
AVCodecContext * codec
Codec context associated with this stream.
void ff_id3v1_read(AVFormatContext *s)
Read an ID3v1 tag.
static av_cold int end(AVCodecContext *avctx)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
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. ...
struct AVInputFormat * iformat
Can only be iformat or oformat, not both at the same time.
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int buf_size
Size of buf except extra allocated bytes.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
enum AVMediaType codec_type
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
#define AV_DICT_IGNORE_SUFFIX