[tracker/tracker-1.4] tracker-extract-gstreamer: Fallback to preview image for album art



commit 9ada511fa86e15b35483712ac7e90d796c1ffd4f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 6 20:51:25 2015 +0200

    tracker-extract-gstreamer: Fallback to preview image for album art
    
    Some files don't provide a cover image, but just a preview image, we can
    use that as albumart.
    
    This commit reuses code from a fallback which looks bogus nowadays, since
    it just does the same than the while loop above. If we reached there, it
    would fail again for sure.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732236

 src/tracker-extract/tracker-extract-gstreamer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index bc84a13..2ce25ae 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -504,7 +504,8 @@ get_embedded_media_art (MetadataExtractor *extractor)
 
        } while (have_sample);
 
-       have_sample = gst_tag_list_get_sample_index (extractor->tagcache, GST_TAG_IMAGE, lindex, 
&extractor->sample);
+       /* Fallback to the preview image */
+       have_sample = gst_tag_list_get_sample_index (extractor->tagcache, GST_TAG_PREVIEW_IMAGE, 0, 
&extractor->sample);
 
        if (have_sample) {
                GstBuffer *buffer;


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