[tracker] tracker-extract: Don't skip the last metadata iterator element in flac files.



commit e9add3172d4965029fe90dd8a33c6b108fc53e01
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 27 17:29:57 2011 +0200

    tracker-extract: Don't skip the last metadata iterator element in flac files.
    
    Fixes GB#633108 - FLAC extractor doesn't work properly, reported by
    Aleksander Morgado.

 src/tracker-extract/tracker-extract-flac.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-flac.c b/src/tracker-extract/tracker-extract-flac.c
index 8afbaf7..3ec9d8d 100644
--- a/src/tracker-extract/tracker-extract-flac.c
+++ b/src/tracker-extract/tracker-extract-flac.c
@@ -183,7 +183,7 @@ tracker_extract_get_metadata (const gchar          *uri,
 		return FALSE;
 	}
 
-	while (!FLAC__metadata_simple_iterator_is_last (iter)) {
+	do {
 		switch (FLAC__metadata_simple_iterator_get_block_type (iter)) {
 		case FLAC__METADATA_TYPE_STREAMINFO:
 			stream = FLAC__metadata_simple_iterator_get_block (iter);
@@ -204,9 +204,7 @@ tracker_extract_get_metadata (const gchar          *uri,
 		default:
 			break;
 		}
-
-		FLAC__metadata_simple_iterator_next (iter);
-	}
+	} while (FLAC__metadata_simple_iterator_next (iter));
 
 	creator = tracker_coalesce_strip (3, fd.artist, fd.albumartist,
 	                                  fd.performer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]