32 for (
int i = 0;
i < p->buf_size - 22;
i++) {
33 if (!p->buf[
i] &&
AV_RL32(p->buf +
i + 1) ==
MKTAG(
'B',
'O',
'N',
'K')) {
40 if (p->buf[
i + 14] == 0)
45 if (p->buf[
i + 19] == 0)
71 if (t ==
MKTAG(
'B',
'O',
'N',
'K')) {
73 }
else if (t ==
MKTAG(
' ',
'I',
'D',
'3')) {
108 .p.extensions =
"bonk",
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rl32(AVIOContext *s)
int avio_r8(AVIOContext *s)
int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
Ensures that the requested seekback buffer size will be available.
#define i(width, name, range_min, range_max)
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta, unsigned int max_search_size)
Read an ID3v2 tag, including supported extra metadata.
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta)
Free memory allocated parsing special (non-text) metadata.
int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta *extra_meta)
Create a stream for each APIC (attached picture) extracted from the ID3v2 header.
int ff_id3v2_parse_priv(AVFormatContext *s, ID3v2ExtraMeta *extra_meta)
Add metadata for all PRIV tags in the ID3v2 header.
#define ID3v2_DEFAULT_MAGIC
Default magic bytes for ID3v2 header: "ID3".
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MKTAG(a, b, c, d)
int nb_channels
Number of channels in this layout.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t duration
Decoding: duration of the stream, in stream time base.