summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d6a87ac)
This function returns zero on failure, and one on success, so the
current check for a negative return value is incorrect. The call to
mp4ff_meta_get_by_index() suffers from the same mistake.
mp4ff_tag_t *tag = metadata.tags + i;
ret = -E_MP4FF_META_READ;
mp4ff_tag_t *tag = metadata.tags + i;
ret = -E_MP4FF_META_READ;
- if (mp4ff_meta_get_by_index(mp4ff, i,
- &tag->item, &tag->value) < 0)
+ if (!mp4ff_meta_get_by_index(mp4ff, i, &tag->item, &tag->value))
goto free_tags;
PARA_INFO_LOG("found: %s: %s\n", tag->item, tag->value);
if (!strcmp(tag->item, "artist"))
goto free_tags;
PARA_INFO_LOG("found: %s: %s\n", tag->item, tag->value);
if (!strcmp(tag->item, "artist"))
if (!found_comment)
add_tag(&metadata, "comment", tags->comment);
ret = -E_MP4FF_META_WRITE;
if (!found_comment)
add_tag(&metadata, "comment", tags->comment);
ret = -E_MP4FF_META_WRITE;
- if (mp4ff_meta_update(&cb, &metadata) < 0)
+ if (!mp4ff_meta_update(&cb, &metadata))
goto free_tags;
ret = 1;
free_tags:
goto free_tags;
ret = 1;
free_tags: