1
0
Fork 0
forked from len0rd/rockbox

Load the album art before the codec because find_albumart would yield to the codec, which would start requesting data before the audio handle is ready.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15584 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2007-11-11 20:09:13 +00:00
parent da293caa16
commit 95db8f8022

View file

@ -2407,6 +2407,22 @@ static bool audio_load_track(int offset, bool start_play)
}
#endif
struct mp3entry *track_id3;
if (track_widx == track_ridx)
track_id3 = &curtrack_id3;
else
track_id3 = bufgetid3(tracks[track_widx].id3_hid);
#ifdef HAVE_ALBUMART
if (gui_sync_wps_uses_albumart())
{
char aa_path[MAX_PATH];
if (find_albumart(track_id3, aa_path, sizeof(aa_path)))
tracks[track_widx].aa_hid = bufopen(aa_path, 0, TYPE_BITMAP);
}
#endif
/* Load the codec. */
if (!audio_loadcodec(start_play))
{
@ -2427,23 +2443,6 @@ static bool audio_load_track(int offset, bool start_play)
goto peek_again;
}
struct mp3entry *track_id3;
if (track_widx == track_ridx)
track_id3 = &curtrack_id3;
else
track_id3 = bufgetid3(tracks[track_widx].id3_hid);
#ifdef HAVE_ALBUMART
if (gui_sync_wps_uses_albumart())
{
char aa_path[MAX_PATH];
if (find_albumart(track_id3, aa_path, sizeof(aa_path)))
tracks[track_widx].aa_hid = bufopen(aa_path, 0, TYPE_BITMAP);
}
#endif
track_id3->elapsed = 0;
enum data_type type = TYPE_PACKET_AUDIO;