diff options
| author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-11 20:09:13 +0000 |
|---|---|---|
| committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-11 20:09:13 +0000 |
| commit | 95db8f8022f80f906f1cc852a2debb47baff74ee (patch) | |
| tree | 2326d360e19931d0918acf99c560cea7a83b1ad9 | |
| parent | da293caa16a019db6bc016c78e6b9f8aed03b5a6 (diff) | |
| download | rockbox-95db8f8022f80f906f1cc852a2debb47baff74ee.zip rockbox-95db8f8022f80f906f1cc852a2debb47baff74ee.tar.gz rockbox-95db8f8022f80f906f1cc852a2debb47baff74ee.tar.bz2 rockbox-95db8f8022f80f906f1cc852a2debb47baff74ee.tar.xz | |
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
| -rw-r--r-- | apps/playback.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/apps/playback.c b/apps/playback.c index 2085549..497f250 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -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; |