return membuffer_write(buf, temp, 4);
}
-struct stdmeta_entry {
- const char *atom;
- const char *name;
-};
-
-struct stdmeta_entry stdmetas[] = {
- {"\xA9" "nam", "title"},
- {"\xA9" "ART", "artist"},
- {"\xA9" "alb", "album"},
- {"\xA9" "day", "date"},
- {"\xA9" "cmt", "comment"},
-};
-
-static const char *find_standard_meta(const char *name) //returns atom name if found, 0 if not
-{
- unsigned n;
- for (n = 0; n < sizeof (stdmetas) / sizeof (stdmetas[0]); n++) {
- if (!strcasecmp(name, stdmetas[n].name))
- return stdmetas[n].atom;
- }
- return 0;
-}
-
static void membuffer_write_std_tag(struct membuffer *buf, const char *name,
const char *value)
{
return ret;
}
+struct stdmeta_entry {
+ const char *atom;
+ const char *name;
+};
+
+static const char *find_standard_meta(const char *name)
+{
+ const struct stdmeta_entry stdmetas[] = {
+ {"\xA9" "nam", "title"},
+ {"\xA9" "ART", "artist"},
+ {"\xA9" "alb", "album"},
+ {"\xA9" "day", "date"},
+ {"\xA9" "cmt", "comment"},
+ };
+
+ for (unsigned n = 0; n < ARRAY_SIZE(stdmetas); n++)
+ if (!strcasecmp(name, stdmetas[n].name))
+ return stdmetas[n].atom;
+ return NULL;
+}
+
static uint32_t create_ilst(const struct mp4_metadata *meta, void **out_buffer,
uint32_t * out_size)
{