summaryrefslogtreecommitdiffabout
path: root/libid3tag
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-08 11:12:05 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-07-08 11:12:05 (GMT)
commite906e318c552d89fdd7d56045cc0fe15a5853547 (patch) (side-by-side diff)
tree448892b20487e6929c4971ab4aec64f4ead6508b /libid3tag
parent3d82867917b5a5d517a0b238b7f0dbd244855dec (diff)
downloadidest-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 'libid3tag') (more/less context) (ignore whitespace changes)
-rw-r--r--libid3tag/frame.c30
-rw-r--r--libid3tag/render.c2
-rw-r--r--libid3tag/tag.c2
3 files changed, 17 insertions, 17 deletions
diff --git a/libid3tag/frame.c b/libid3tag/frame.c
index bf4e7a4..21f987a 100644
--- a/libid3tag/frame.c
+++ b/libid3tag/frame.c
@@ -274,11 +274,8 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
unsigned int version)
{
struct id3_frame *frame = 0;
- id3_byte_t const *id,
- *end,
- *data;
- id3_length_t size,
- decoded_length = 0;
+ id3_byte_t const *id, *end, *data;
+ id3_length_t size, decoded_length = 0;
int flags = 0,
group_id = 0,
encryption_method = 0;
@@ -295,7 +292,7 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
if (length < 6)
goto fail;
- compat = id3_compat_lookup(id, 3);
+ compat = id3_compat_lookup((char*)id, 3);
*ptr += 3;
size = id3_parse_uint(ptr, 3);
@@ -311,7 +308,7 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
if (length < 10)
goto fail;
- compat = id3_compat_lookup(id, 4);
+ compat = id3_compat_lookup((char*)id, 4);
*ptr += 4;
size = id3_parse_uint(ptr, 4);
@@ -324,8 +321,9 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
if (flags & (ID3_FRAME_FLAG_FORMATFLAGS & ~0x00e0)) {
frame =
- unparseable(id, ptr, end - *ptr, 0, 0,
- 0, 0);
+ unparseable((char*)id, ptr,
+ end - *ptr, 0, 0,
+ 0, 0);
goto done;
}
@@ -368,14 +366,14 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
*/
if (compat && compat->equiv)
- id = compat->equiv;
+ id = (id3_byte_t*) compat->equiv;
else if (ID3_TAG_VERSION_MAJOR(version) == 2) {
xid[0] = 'Y';
xid[1] = id[0];
xid[2] = id[1];
xid[3] = id[2];
- id = xid;
+ id = (id3_byte_t*) xid;
flags |=
ID3_FRAME_FLAG_TAGALTERPRESERVATION |
@@ -398,7 +396,8 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
(ID3_FRAME_FLAG_FORMATFLAGS &
~ID3_FRAME_FLAG_KNOWNFLAGS)) {
frame =
- unparseable(id, ptr, end - *ptr, flags, 0, 0,
+ unparseable((char*) id,
+ ptr, end - *ptr, flags, 0, 0,
0);
goto done;
}
@@ -448,7 +447,8 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
}
if (flags & ID3_FRAME_FLAG_ENCRYPTION) {
- frame = unparseable(id, &data, end - data, flags,
+ frame = unparseable((char*) id,
+ &data, end - data, flags,
group_id, encryption_method,
decoded_length);
goto done;
@@ -474,7 +474,7 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
*/
if (compat && !compat->equiv) {
- frame = obsolete(id, data, end - data);
+ frame = obsolete((char*) id, data, end - data);
goto done;
}
@@ -482,7 +482,7 @@ id3_frame_parse(id3_byte_t const **ptr, id3_length_t length,
* generate the internal frame structure
*/
- frame = id3_frame_new(id);
+ frame = id3_frame_new((char*) id);
if (frame) {
frame->flags = flags;
frame->group_id = group_id;
diff --git a/libid3tag/render.c b/libid3tag/render.c
index 431c28d..8867cef 100644
--- a/libid3tag/render.c
+++ b/libid3tag/render.c
@@ -129,7 +129,7 @@ id3_render_latin1(id3_byte_t ** ptr,
id3_length_t size;
if (latin1 == 0)
- latin1 = "";
+ latin1 = (id3_latin1_t*) "";
size = id3_latin1_size(latin1);
if (!terminate)
diff --git a/libid3tag/tag.c b/libid3tag/tag.c
index c23a967..50d7cb1 100644
--- a/libid3tag/tag.c
+++ b/libid3tag/tag.c
@@ -369,7 +369,7 @@ v1_attachstr(struct id3_tag *tag, char const *id,
goto fail;
if (text)
- id3_latin1_decode(text, ucs4);
+ id3_latin1_decode((id3_byte_t*) text, ucs4);
else
id3_ucs4_putnumber(ucs4, number);

Return to:

Send suggestions and report system problems to the System administrator.