return read_u32_be(&src);
}
-static uint32_t modify_moov(struct mp4 *f, const struct mp4_metadata *data,
- void **out_buffer, uint32_t * out_size)
+static uint32_t modify_moov(struct mp4 *f, void **out_buffer,
+ uint32_t *out_size)
{
uint64_t total_base = f->moov_offset + 8;
uint32_t total_size = (uint32_t) (f->moov_size - 8);
struct membuffer *buf;
void *new_udta_buffer;
uint32_t new_udta_size;
- if (!create_udta(data, &new_udta_buffer, &new_udta_size))
+ if (!create_udta(&f->tags, &new_udta_buffer, &new_udta_size))
return 0;
buf = membuffer_create();
void *new_meta_buffer;
uint32_t new_meta_size;
- if (!create_meta(data, &new_meta_buffer, &new_meta_size))
+ if (!create_meta(&f->tags, &new_meta_buffer, &new_meta_size))
return 0;
buf = membuffer_create();
ilst_offset = get_position(f);
ilst_size = read_int32(f);
- if (!create_ilst(data, &new_ilst_buffer, &new_ilst_size))
+ if (!create_ilst(&f->tags, &new_ilst_buffer, &new_ilst_size))
return 0;
size_delta = new_ilst_size - (ilst_size - 8);
return write_data(f, temp, sizeof(temp));
}
-int32_t mp4_meta_update(struct mp4 *f, struct mp4_metadata *meta)
+int32_t mp4_meta_update(struct mp4 *f)
{
void *new_moov_data;
uint32_t new_moov_size;
set_position(f, 0);
- if (!modify_moov(f, meta, &new_moov_data, &new_moov_size)) {
+ if (!modify_moov(f, &new_moov_data, &new_moov_size)) {
mp4_close(f);
return 0;
}
struct mp4 *mp4_open_meta(const struct mp4_callback *cb);
struct mp4_metadata *mp4_get_meta(struct mp4 *f);
-int32_t mp4_meta_update(struct mp4 *f, struct mp4_metadata *meta);
+int32_t mp4_meta_update(struct mp4 *f);
char *mp4_meta_get_artist(const struct mp4 *f);
char *mp4_meta_get_title(const struct mp4 *f);
char *mp4_meta_get_date(const struct mp4 *f);