summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/cuesheet.h1
-rw-r--r--apps/mpeg.c1
-rw-r--r--apps/playback.c21
3 files changed, 14 insertions, 9 deletions
diff --git a/apps/cuesheet.h b/apps/cuesheet.h
index 22ad92fdd3..8ee0f6b3a7 100644
--- a/apps/cuesheet.h
+++ b/apps/cuesheet.h
@@ -39,7 +39,6 @@ struct cue_track_info {
struct cuesheet {
char path[MAX_PATH];
- char audio_filename[MAX_PATH];
char title[MAX_NAME*3+1];
char performer[MAX_NAME*3+1];
diff --git a/apps/mpeg.c b/apps/mpeg.c
index e8cc03d014..e28260b6a7 100644
--- a/apps/mpeg.c
+++ b/apps/mpeg.c
@@ -2057,7 +2057,6 @@ struct mp3entry* audio_current_track()
if (look_for_cuesheet_file(id3->path, cuepath) &&
parse_cuesheet(cuepath, curr_cuesheet))
{
- strcpy(curr_cuesheet->audio_filename, id3->path);
id3->cuesheet = curr_cuesheet;
cue_spoof_id3(curr_cuesheet, id3);
}
diff --git a/apps/playback.c b/apps/playback.c
index 7bd3f252ae..1874430823 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1853,15 +1853,22 @@ static void audio_finish_load_track(void)
if (curr_cue)
{
char cuepath[MAX_PATH];
-
- struct cuesheet temp_cue;
-
- if (look_for_cuesheet_file(track_id3->path, cuepath) &&
- parse_cuesheet(cuepath, &temp_cue))
+ if (look_for_cuesheet_file(track_id3->path, cuepath))
{
- strcpy(temp_cue.audio_filename, track_id3->path);
+ void *temp;
tracks[track_widx].cuesheet_hid =
- bufalloc(&temp_cue, sizeof(struct cuesheet), TYPE_CUESHEET);
+ bufalloc(NULL, sizeof(struct cuesheet), TYPE_CUESHEET);
+ if (tracks[track_widx].cuesheet_hid >= 0)
+ {
+ bufgetdata(tracks[track_widx].cuesheet_hid,
+ sizeof(struct cuesheet), &temp);
+ struct cuesheet *cuesheet = (struct cuesheet*)temp;
+ if (!parse_cuesheet(cuepath, cuesheet))
+ {
+ bufclose(tracks[track_widx].cuesheet_hid);
+ track_id3->cuesheet = NULL;
+ }
+ }
}
}
#ifdef HAVE_ALBUMART