[brasero] Fix #594336 - Brasero audio CD creator fails to load FLAC/WAV files without file type name extensio
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix #594336 - Brasero audio CD creator fails to load FLAC/WAV files without file type name extensio
- Date: Tue, 8 Sep 2009 16:12:33 +0000 (UTC)
commit 5aeee96a116bf27f3bfc2f86af5b0a9c585a0973
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Sep 8 18:08:12 2009 +0200
Fix #594336 - Brasero audio CD creator fails to load FLAC/WAV files without file type name extensions
libbrasero-utils/brasero-io.c | 8 ++++++--
libbrasero-utils/brasero-metadata.c | 5 +++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/libbrasero-utils/brasero-io.c b/libbrasero-utils/brasero-io.c
index 9f19162..a2c0ec4 100644
--- a/libbrasero-utils/brasero-io.c
+++ b/libbrasero-utils/brasero-io.c
@@ -820,6 +820,9 @@ brasero_io_set_metadata_attributes (GFileInfo *info,
g_file_info_set_attribute_int32 (info, BRASERO_IO_ISRC, metadata->isrc);
g_file_info_set_attribute_uint64 (info, BRASERO_IO_LEN, metadata->len);
+ if (metadata->type)
+ g_file_info_set_content_type (info, metadata->type);
+
if (metadata->artist)
g_file_info_set_attribute_string (info, BRASERO_IO_ARTIST, metadata->artist);
@@ -998,12 +1001,13 @@ brasero_io_get_metadata_info (BraseroIO *self,
priv = BRASERO_IO_PRIVATE (self);
mime = g_file_info_get_content_type (info);
+ BRASERO_UTILS_LOG ("Found file with type %s", mime);
+
if (mime
&& (!strncmp (mime, "image/", 6)
|| !strcmp (mime, "text/plain")
|| !strcmp (mime, "application/x-cue") /* this one make gstreamer crash */
- || !strcmp (mime, "application/x-cd-image")
- || !strcmp (mime, "application/octet-stream")))
+ || !strcmp (mime, "application/x-cd-image")))
return FALSE;
BRASERO_UTILS_LOG ("Retrieving metadata info");
diff --git a/libbrasero-utils/brasero-metadata.c b/libbrasero-utils/brasero-metadata.c
index 2454939..416a997 100644
--- a/libbrasero-utils/brasero-metadata.c
+++ b/libbrasero-utils/brasero-metadata.c
@@ -523,6 +523,11 @@ brasero_metadata_get_mime_type (BraseroMetadata *self)
mime = gst_structure_get_name (gst_caps_get_structure (caps, 0));
gst_object_unref (typefind);
+ BRASERO_UTILS_LOG ("Mime type %s", mime);
+
+ if (!mime)
+ return FALSE;
+
if (!strcmp (mime, "application/x-id3"))
priv->info->type = g_strdup ("audio/mpeg");
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]