diff options
author | Roman Artiukhin <bahusdrive@gmail.com> | 2024-11-07 11:12:01 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-11-07 07:53:41 -0500 |
commit | da478aaa3237b691dfaa4676eb384fc64349e8ea (patch) | |
tree | 8af302bcb497a715261e02cbd8c82155900a60de | |
parent | 2156d9874f205c660a9d53aae503fe5d3349b669 (diff) | |
download | rockbox-da478aaa32.tar.gz rockbox-da478aaa32.zip |
metadata: mp3: Simplify comment tag processing
Avoid unnecessary string comparison.
Change-Id: Ib1c5622f7b7760c43c4763930dc4ef6b409dbc05
-rw-r--r-- | lib/rbcodec/metadata/id3tags.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rbcodec/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c index bc811cc013..506cbcaaf1 100644 --- a/lib/rbcodec/metadata/id3tags.c +++ b/lib/rbcodec/metadata/id3tags.c @@ -996,8 +996,7 @@ retry_with_limit: * remove them so unicode_munge can work correctly */ - if((tr->tag_length == 4 && !memcmp( header, "COMM", 4)) || - (tr->tag_length == 3 && !memcmp( header, "COM", 3))) { + if (tr->offset == offsetof(struct mp3entry, comment)) { int offset; if (buffersize - bufferpos <= 4) return; /* Error ?? */ |