diff --git a/plugins/gst-thumbnailer/gst-thumbnailer-provider.c b/plugins/gst-thumbnailer/gst-thumbnailer-provider.c index 9e077c7..f658110 100644 --- a/plugins/gst-thumbnailer/gst-thumbnailer-provider.c +++ b/plugins/gst-thumbnailer/gst-thumbnailer-provider.c @@ -126,6 +126,55 @@ gst_thumbnailer_provider_get_thumbnailers (TumblerThumbnailerProvider *provider) "application/x-shorten", "application/x-smil", "application/xspf+xml", + "audio/3gpp", + "audio/ac3", + "audio/AMR", + "audio/AMR-WB", + "audio/basic", + "audio/flac", + "audio/midi", + "audio/mp2", + "audio/mp4", + "audio/mpeg", + "audio/mpegurl", + "audio/ogg", + "audio/prs.sid", + "audio/vnd.rn-realaudio", + "audio/x-aiff", + "audio/x-ape", + "audio/x-flac", + "audio/x-gsm", + "audio/x-it", + "audio/x-m4a", + "audio/x-matroska", + "audio/x-mod", + "audio/x-mp3", + "audio/x-mpeg", + "audio/x-mpegurl", + "audio/x-ms-asf", + "audio/x-ms-asx", + "audio/x-ms-wax", + "audio/x-ms-wma", + "audio/x-musepack", + "audio/x-pn-aiff", + "audio/x-pn-au", + "audio/x-pn-realaudio", + "audio/x-pn-realaudio-plugin", + "audio/x-pn-wav", + "audio/x-pn-windows-acm", + "audio/x-realaudio", + "audio/x-real-audio", + "audio/x-s3m", + "audio/x-sbc", + "audio/x-scpls", + "audio/x-speex", + "audio/x-stm", + "audio/x-tta", + "audio/x-wav", + "audio/x-wavpack", + "audio/x-vorbis", + "audio/x-vorbis+ogg", + "audio/x-xm", "image/vnd.rn-realpix", "image/x-pict", "misc/ultravox", diff --git a/plugins/gst-thumbnailer/gst-thumbnailer.c b/plugins/gst-thumbnailer/gst-thumbnailer.c index 284a0b9..8fdb85f 100644 --- a/plugins/gst-thumbnailer/gst-thumbnailer.c +++ b/plugins/gst-thumbnailer/gst-thumbnailer.c @@ -138,15 +138,16 @@ gst_thumbnailer_cover_from_tags (GstTagList *tags, { GstSample *cover = NULL; guint i; - GstSample *sample; GstCaps *caps; const GstStructure *caps_struct; - gint type; + gint type = GST_TAG_IMAGE_TYPE_UNDEFINED; GstBuffer *buffer; GdkPixbuf *pixbuf = NULL; for (i = 0; ; i++) { + GstSample *sample; + if (g_cancellable_is_cancelled (cancellable)) break; @@ -161,14 +162,13 @@ gst_thumbnailer_cover_from_tags (GstTagList *tags, GST_TYPE_TAG_IMAGE_TYPE, &type); - if (type == GST_TAG_IMAGE_TYPE_FRONT_COVER) - { - /* found the cover */ - cover = sample; - break; - } + if (cover != NULL) + gst_sample_unref (cover); + cover = sample; - gst_sample_unref (sample); + /* prefer the from cover image if specified */ + if (type == GST_TAG_IMAGE_TYPE_FRONT_COVER) + break; } if (cover == NULL