28 #define APE_TAG_VERSION 2000
29 #define APE_TAG_FOOTER_BYTES 32
30 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
31 #define APE_TAG_FLAG_IS_HEADER (1 << 29)
36 uint8_t key[1024], *value;
42 for (i = 0; i <
sizeof(key) - 1; i++) {
44 if (c < 0x20 || c > 0x7E)
71 uint32_t val, fields, tag_bytes;
81 if (strncmp(buf,
"APETAGEX", 8)) {
109 avio_seek(pb, file_size - tag_bytes, SEEK_SET);
111 for (i=0; i<fields; i++)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
#define AV_LOG_WARNING
Something somehow does not look correct.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
void av_log(void *avcl, int level, const char *fmt,...)
int avio_r8(AVIOContext *s)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
void ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#define APE_TAG_FOOTER_BYTES
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
#define APE_TAG_FLAG_IS_HEADER
static int ape_tag_read_field(AVFormatContext *s)