[totem-pl-parser] plparse: Fix parsing of Windows Media files



commit fea76a74da1f2096a9fb1be3a2ab98e7569ee5dc
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Sep 22 08:49:08 2014 +0200

    plparse: Fix parsing of Windows Media files
    
    With recent versions of shared-mime-info, application/vnd.ms-asf is
    preferred to video/x-ms-asf. This broke parsing of videos masquerading
    as playlists, and vice-versa.

 plparse/totem-pl-parser-private.h |    2 +-
 plparse/totem-pl-parser.c         |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plparse/totem-pl-parser-private.h b/plparse/totem-pl-parser-private.h
index 495f9c4..48c8923 100644
--- a/plparse/totem-pl-parser-private.h
+++ b/plparse/totem-pl-parser-private.h
@@ -79,7 +79,7 @@
 #define OPML_MIME_TYPE "text/x-opml+xml"
 #define QUICKTIME_META_MIME_TYPE "application/x-quicktime-media-link"
 #define ASX_MIME_TYPE "audio/x-ms-asx"
-#define ASF_REF_MIME_TYPE "video/x-ms-asf"
+#define ASF_REF_MIME_TYPE "application/vnd.ms-asf"
 
 #define TOTEM_PL_PARSER_FIELD_FILE             "gfile-object"
 #define TOTEM_PL_PARSER_FIELD_BASE_FILE                "gfile-object-base"
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index cb1429b..bf46286 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -233,6 +233,7 @@ static PlaylistTypes dual_types[] = {
        PLAYLIST_TYPE2 ("application/x-php", NULL, NULL),
        PLAYLIST_TYPE2 ("audio/x-ms-asx", totem_pl_parser_add_asx, totem_pl_parser_is_asx),
        PLAYLIST_TYPE2 ("video/x-ms-asf", totem_pl_parser_add_asf, totem_pl_parser_is_asf),
+       PLAYLIST_TYPE2 ("application/vnd.ms-asf", totem_pl_parser_add_asf, totem_pl_parser_is_asf),
        PLAYLIST_TYPE2 ("video/x-ms-wmv", totem_pl_parser_add_asf, totem_pl_parser_is_asf),
        PLAYLIST_TYPE2 ("audio/x-ms-wma", totem_pl_parser_add_asf, totem_pl_parser_is_asf),
        PLAYLIST_TYPE2 ("video/quicktime", totem_pl_parser_add_quicktime, totem_pl_parser_is_quicktime),


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