totem-pl-parser r244 - in branches/gnome-2-24: . plparse
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem-pl-parser r244 - in branches/gnome-2-24: . plparse
- Date: Tue, 21 Oct 2008 09:21:05 +0000 (UTC)
Author: hadess
Date: Tue Oct 21 09:21:05 2008
New Revision: 244
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=244&view=rev
Log:
2008-10-21 Bastien Nocera <hadess hadess net>
* plparse/totem-pl-parser.c (totem_pl_parser_parse_internal):
Fix M3U file parsing, the content-type detection is unreliable
so ignore it if it doesn't bring us anything new
(Closes: #556060)
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/plparse/totem-pl-parser.c
Modified: branches/gnome-2-24/plparse/totem-pl-parser.c
==============================================================================
--- branches/gnome-2-24/plparse/totem-pl-parser.c (original)
+++ branches/gnome-2-24/plparse/totem-pl-parser.c Tue Oct 21 09:21:05 2008
@@ -1467,9 +1467,15 @@
DEBUG(file, g_print ("_get_mime_type_for_name for '%s' returned '%s'\n", uri, mimetype));
if (mimetype == NULL || strcmp (UNKNOWN_TYPE, mimetype) == 0
|| (g_file_is_native (file) && g_content_type_is_a (mimetype, "text/plain") != FALSE)) {
- g_free (mimetype);
- mimetype = my_g_file_info_get_mime_type_with_data (file, &data, parser);
- DEBUG(file, g_print ("_get_mime_type_with_data for '%s' returned '%s'\n", uri, mimetype ? mimetype : "NULL"));
+ char *new_mimetype;
+ new_mimetype = my_g_file_info_get_mime_type_with_data (file, &data, parser);
+ if (new_mimetype) {
+ g_free (mimetype);
+ mimetype = new_mimetype;
+ DEBUG(file, g_print ("_get_mime_type_with_data for '%s' returned '%s'\n", uri, mimetype ? mimetype : "NULL"));
+ } else {
+ DEBUG(file, g_print ("_get_mime_type_with_data for '%s' returned NULL, ignoring\n", uri));
+ }
}
if (mimetype == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]