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:
parent
da293caa16
commit
95db8f8022
1 changed files with 16 additions and 17 deletions
|
@ -2407,6 +2407,22 @@ static bool audio_load_track(int offset, bool start_play)
|
||||||
}
|
}
|
||||||
#endif
|
#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. */
|
/* Load the codec. */
|
||||||
if (!audio_loadcodec(start_play))
|
if (!audio_loadcodec(start_play))
|
||||||
{
|
{
|
||||||
|
@ -2427,23 +2443,6 @@ static bool audio_load_track(int offset, bool start_play)
|
||||||
goto peek_again;
|
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;
|
track_id3->elapsed = 0;
|
||||||
|
|
||||||
enum data_type type = TYPE_PACKET_AUDIO;
|
enum data_type type = TYPE_PACKET_AUDIO;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue