35 {
"ALBUMARTIST",
"album_artist" },
36 {
"TRACKNUMBER",
"track" },
37 {
"DISCNUMBER",
"disc" },
39 {
"DISCSUBTITLE",
"disc_subtitle" },
40 {
"DESCRIPTION",
"comment" },
45 AVChapter **chapters,
unsigned int nb_chapters)
63 const char *vendor_string,
64 AVChapter **chapters,
unsigned int nb_chapters)
66 size_t vendor_string_length = strlen(vendor_string);
69 avio_write(pb, vendor_string, vendor_string_length);
71 if (nb_chapters > 1000)
73 if (chapters && nb_chapters) {
74 for (
int i = 0;
i < nb_chapters;
i++) {
85 if (len1+1+len2 > UINT32_MAX)
92 for (
int i = 0;
i < nb_chapters;
i++) {
94 char chapter_time[64];
102 len =
snprintf(chapter_time,
sizeof(chapter_time),
"CHAPTER%03d=%02d:%02d:%02d.%03d",
i,
h, m,
s, ms);
108 int64_t len1 = !strcmp(
tag->key,
"title") ? 4 : strlen(
tag->key);
110 if (len1+1+len2+10 > UINT32_MAX)
114 if (!strcmp(
tag->key,
"title"))
void avio_wl32(AVIOContext *s, unsigned int val)
void avio_w8(AVIOContext *s, int b)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int ffio_open_null_buf(AVIOContext **s)
Open a write-only fake memory stream.
int ffio_close_null_buf(AVIOContext *s)
Close a null buffer.
static int FUNC metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
#define i(width, name, range_min, range_max)
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
static AVRational av_make_q(int num, int den)
Create an AVRational.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
AVRational time_base
time base in which the start/end timestamps are specified