diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 21 |
1 files changed, 14 insertions, 7 deletions
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) | |||
1853 | if (curr_cue) | 1853 | if (curr_cue) |
1854 | { | 1854 | { |
1855 | char cuepath[MAX_PATH]; | 1855 | char cuepath[MAX_PATH]; |
1856 | 1856 | if (look_for_cuesheet_file(track_id3->path, cuepath)) | |
1857 | struct cuesheet temp_cue; | ||
1858 | |||
1859 | if (look_for_cuesheet_file(track_id3->path, cuepath) && | ||
1860 | parse_cuesheet(cuepath, &temp_cue)) | ||
1861 | { | 1857 | { |
1862 | strcpy(temp_cue.audio_filename, track_id3->path); | 1858 | void *temp; |
1863 | tracks[track_widx].cuesheet_hid = | 1859 | tracks[track_widx].cuesheet_hid = |
1864 | bufalloc(&temp_cue, sizeof(struct cuesheet), TYPE_CUESHEET); | 1860 | bufalloc(NULL, sizeof(struct cuesheet), TYPE_CUESHEET); |
1861 | if (tracks[track_widx].cuesheet_hid >= 0) | ||
1862 | { | ||
1863 | bufgetdata(tracks[track_widx].cuesheet_hid, | ||
1864 | sizeof(struct cuesheet), &temp); | ||
1865 | struct cuesheet *cuesheet = (struct cuesheet*)temp; | ||
1866 | if (!parse_cuesheet(cuepath, cuesheet)) | ||
1867 | { | ||
1868 | bufclose(tracks[track_widx].cuesheet_hid); | ||
1869 | track_id3->cuesheet = NULL; | ||
1870 | } | ||
1871 | } | ||
1865 | } | 1872 | } |
1866 | } | 1873 | } |
1867 | #ifdef HAVE_ALBUMART | 1874 | #ifdef HAVE_ALBUMART |