diff options
author | Jonas Häggqvist <rasher@rasher.dk> | 2008-12-12 19:38:08 +0000 |
---|---|---|
committer | Jonas Häggqvist <rasher@rasher.dk> | 2008-12-12 19:38:08 +0000 |
commit | 790f5ae1e0f90bcbb85950a60b8597e4e40ed0ba (patch) | |
tree | 225152820829eed04eab9727621d23d86bb5beb0 | |
parent | 4f81ee65fa0cb72aa75f2a15b624cbb32bd0369e (diff) | |
download | rockbox-790f5ae1e0f90bcbb85950a60b8597e4e40ed0ba.tar.gz rockbox-790f5ae1e0f90bcbb85950a60b8597e4e40ed0ba.zip |
Pictureflow:
- Always initialise artist and albumartist to NULL to avoid segfaults and other nastiness (closes FS#9266). Ideally they should be set to their actual values (would fix FS#9606), but this fix at least avoids some problems.
- Be a bit more precise in the error given when no albumart is found.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19404 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/pictureflow.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 232c3f6bc4..7a3495940c 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c | |||
@@ -510,6 +510,8 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf, int buflen | |||
510 | PREFERRED_IMG_HEIGHT); | 510 | PREFERRED_IMG_HEIGHT); |
511 | rb->strncpy( (char*)&id3.path, tcs.result, MAX_PATH ); | 511 | rb->strncpy( (char*)&id3.path, tcs.result, MAX_PATH ); |
512 | id3.album = get_album_name(slide_index); | 512 | id3.album = get_album_name(slide_index); |
513 | /* xxx: Should set id3.artist / id3.albumartist to their real values */ | ||
514 | id3.artist = id3.albumartist = NULL; | ||
513 | if ( rb->search_albumart_files(&id3, size, buf, buflen) ) | 515 | if ( rb->search_albumart_files(&id3, size, buf, buflen) ) |
514 | result = true; | 516 | result = true; |
515 | else if ( rb->search_albumart_files(&id3, "", buf, buflen) ) | 517 | else if ( rb->search_albumart_files(&id3, "", buf, buflen) ) |
@@ -652,7 +654,8 @@ bool create_albumart_cache(bool force) | |||
652 | if ( rb->button_get(false) == PICTUREFLOW_MENU ) return false; | 654 | if ( rb->button_get(false) == PICTUREFLOW_MENU ) return false; |
653 | } | 655 | } |
654 | if ( slides == 0 ) { | 656 | if ( slides == 0 ) { |
655 | rb->splash(2*HZ, "No albums found"); | 657 | /* Warn the user that we couldn't find any albumart */ |
658 | rb->splash(2*HZ, "No album art found"); | ||
656 | return false; | 659 | return false; |
657 | } | 660 | } |
658 | config.avg_album_width /= slides; | 661 | config.avg_album_width /= slides; |