summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/cuesheet.c8
-rw-r--r--apps/metadata.c4
-rw-r--r--apps/metadata.h3
-rw-r--r--apps/metadata/id3tags.c8
-rw-r--r--apps/metadata/vorbis.c8
5 files changed, 16 insertions, 15 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 2c2567b391..354f976997 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -49,11 +49,11 @@ bool look_for_cuesheet_file(struct mp3entry *track_id3, struct cuesheet_file *cu
char cuepath[MAX_PATH];
char *dot, *slash;
- if (track_id3->embed_cuesheet.present)
+ if (track_id3->has_embedded_cuesheet)
{
- cue_file->pos = track_id3->embed_cuesheet.pos;
- cue_file->size = track_id3->embed_cuesheet.size;
- cue_file->encoding = track_id3->embed_cuesheet.encoding;
+ cue_file->pos = track_id3->embedded_cuesheet.pos;
+ cue_file->size = track_id3->embedded_cuesheet.size;
+ cue_file->encoding = track_id3->embedded_cuesheet.encoding;
strlcpy(cue_file->path, track_id3->path, MAX_PATH);
return true;
}
diff --git a/apps/metadata.c b/apps/metadata.c
index 898436781b..2a93c1880c 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -439,8 +439,8 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
id3->codectype = probe_file_format(trackname);
/* default values for embedded cuesheets */
- id3->embed_cuesheet.present = false;
- id3->embed_cuesheet.pos = 0;
+ id3->has_embedded_cuesheet = false;
+ id3->embedded_cuesheet.pos = 0;
entry = &audio_formats[id3->codectype];
diff --git a/apps/metadata.h b/apps/metadata.h
index 707e5c2c37..2e16f4d47e 100644
--- a/apps/metadata.h
+++ b/apps/metadata.h
@@ -322,7 +322,8 @@ struct mp3entry {
#endif
/* Cuesheet support */
- struct embedded_cuesheet embed_cuesheet;
+ bool has_embedded_cuesheet;
+ struct embedded_cuesheet embedded_cuesheet;
struct cuesheet *cuesheet;
/* Musicbrainz Track ID */
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index 85025c61b1..2dd1c662ed 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -1029,12 +1029,12 @@ void setid3v2title(int fd, struct mp3entry *entry)
break;
}
if (char_enc > 0) {
- entry->embed_cuesheet.present = true;
- entry->embed_cuesheet.pos = lseek(fd, 0, SEEK_CUR)
+ entry->has_embedded_cuesheet = true;
+ entry->embedded_cuesheet.pos = lseek(fd, 0, SEEK_CUR)
- framelen + cuesheet_offset;
- entry->embed_cuesheet.size = totframelen
+ entry->embedded_cuesheet.size = totframelen
- cuesheet_offset;
- entry->embed_cuesheet.encoding = char_enc;
+ entry->embedded_cuesheet.encoding = char_enc;
}
break;
}
diff --git a/apps/metadata/vorbis.c b/apps/metadata/vorbis.c
index 29848daa19..58bd781873 100644
--- a/apps/metadata/vorbis.c
+++ b/apps/metadata/vorbis.c
@@ -353,10 +353,10 @@ long read_vorbis_tags(int fd, struct mp3entry *id3,
/* Is it an embedded cuesheet? */
if (!strcasecmp(name, "CUESHEET"))
{
- id3->embed_cuesheet.present = true;
- id3->embed_cuesheet.pos = lseek(file.fd, 0, SEEK_CUR) - read_len;
- id3->embed_cuesheet.size = len;
- id3->embed_cuesheet.encoding = CHAR_ENC_UTF_8;
+ id3->has_embedded_cuesheet = true;
+ id3->embedded_cuesheet.pos = lseek(file.fd, 0, SEEK_CUR) - read_len;
+ id3->embedded_cuesheet.size = len;
+ id3->embedded_cuesheet.encoding = CHAR_ENC_UTF_8;
}
else
{