44 int i, cnum,
h, m,
s, ms, keylen = strlen(
key);
51 if (sscanf(
val,
"%02d:%02d:%02d.%03d", &
h, &m, &
s, &ms) < 4)
55 ms + 1000 * (
s + 60 * (m + 60 *
h)),
74 const uint8_t *buf,
int size)
91 const uint8_t *buf, uint32_t
size,
92 int *updates,
int parse_picture)
94 char *t = (
char*)buf, *v = memchr(t,
'=',
size);
119 if (!
av_strcasecmp(t,
"METADATA_BLOCK_PICTURE") && parse_picture) {
149 const uint8_t *buf,
int size,
152 const uint8_t *p = buf;
153 const uint8_t *end = buf +
size;
162 s = bytestream_get_le32(&p);
164 if (end - p - 4 <
s ||
s < 0)
169 n = bytestream_get_le32(&p);
171 while (end - p >= 4 && n > 0) {
172 s = bytestream_get_le32(&p);
174 if (end - p <
s ||
s < 0)
186 "%td bytes of comment header remain\n", end - p);
189 "truncated comment header, %i comments not found\n", n);
static double val(void *priv, double ch)
#define i(width, name, range_min, range_max)
AVChapter * avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, int64_t start, int64_t end, const char *title)
Add a new chapter.
int ff_flac_parse_picture(AVFormatContext *s, uint8_t **bufp, int buf_size, int truncate_workaround)
Parse a FLAC METADATA_BLOCK_PICTURE.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
#define AV_BASE64_DECODE_SIZE(x)
Calculate the output size in bytes needed to decode a base64 string with length x to a data buffer.
int av_base64_decode(uint8_t *out, const char *in_str, int out_size)
Decode a base64-encoded string.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define AV_DICT_APPEND
If the entry already exists, append to it.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_INFO
Standard information.
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
int av_strncasecmp(const char *a, const char *b, size_t n)
Locale-independent case-insensitive compare.
#define AV_NOPTS_VALUE
Undefined timestamp value.
Memory handling functions.
int64_t id
unique ID to identify the chapter
unsigned int nb_chapters
Number of chapters in AVChapter array.
Rational number (pair of numerator and denominator).
int event_flags
Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*.