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



commit adffa68b6b45f3f5999f5fbd2a1d409d55f8b9b1
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 af4a408..ac4a2e3 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]