[libmediaart] extract: Fixed process_buffer() len check (was inverted) and artist/title
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libmediaart] extract: Fixed process_buffer() len check (was inverted) and artist/title
- Date: Mon, 28 Jul 2014 20:13:05 +0000 (UTC)
commit b3f7fd032e2fb7a1bb6a13c7fd0cf60b500639e2
Author: Martyn Russell <martyn lanedo com>
Date: Mon Jul 28 22:12:01 2014 +0200
extract: Fixed process_buffer() len check (was inverted) and artist/title
libmediaart/extract.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index 7091aac..692a3ee 100644
--- a/libmediaart/extract.c
+++ b/libmediaart/extract.c
@@ -1507,6 +1507,8 @@ get_heuristic_for_parent_path (GFile *file,
* @buffer, the image data will be converted to the correct format and
* saved in the media art cache.
*
+ * Either @artist OR @title can be %NULL, but they can not both be %NULL.
+ *
* If @file is on a removable filesystem, the media art file will be saved in a
* cache on the removable file system rather than on the host machine.
*
@@ -1536,7 +1538,8 @@ media_art_process_buffer (MediaArtProcess *process,
g_return_val_if_fail (type > MEDIA_ART_NONE && type < MEDIA_ART_TYPE_COUNT, FALSE);
g_return_val_if_fail (G_IS_FILE (related_file), FALSE);
g_return_val_if_fail (buffer != NULL, FALSE);
- g_return_val_if_fail (len < 0, FALSE);
+ g_return_val_if_fail (len > 0, FALSE);
+ g_return_val_if_fail (artist != NULL || title != NULL, FALSE);
processed = created = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]