diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-08 14:12:05 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-08 14:12:05 +0300 |
commit | e906e318c552d89fdd7d56045cc0fe15a5853547 (patch) | |
tree | 448892b20487e6929c4971ab4aec64f4ead6508b /src/idop.c | |
parent | 3d82867917b5a5d517a0b238b7f0dbd244855dec (diff) | |
download | idest-e906e318c552d89fdd7d56045cc0fe15a5853547.tar.gz idest-e906e318c552d89fdd7d56045cc0fe15a5853547.tar.bz2 |
Make sure no old tag instances remain after modifications.
* src/guile.c (guile_transform): Remove existing tags prior to
installing new ones.
* src/idop.c (set_tags): Remove all existing instances of the tag
except the first one prior to altering it.
* libid3tag/frame.c: Add type casts.
* libid3tag/render.c: Likewise.
* libid3tag/tag.c: Likewise.
Diffstat (limited to 'src/idop.c')
-rw-r--r-- | src/idop.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -114,6 +114,14 @@ set_tags(const char *name) frame = id3_frame_new(item->id); if (id3_tag_attachframe(tag, frame)) error(1, 0, "cannot attach new frame"); + } else { + struct id3_frame *fp; + + while (fp = id3_tag_findframe(tag, item->id, + 1)) { + id3_tag_detachframe(tag, fp); + id3_frame_delete(fp); + } } set_frame_value(frame, item->v.value); modified |= 1; |