[vlc-commits] input: use video/MP2P MIME type for MPEG-PS (fixes #15203)

Rémi Denis-Courmont git at videolan.org
Sat Aug 8 17:21:18 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug  8 18:17:01 2015 +0300| [25d994923ddb802c4814a22de2afbe54ebee8271] | committer: Rémi Denis-Courmont

input: use video/MP2P MIME type for MPEG-PS (fixes #15203)

video/mpeg is underspecified, could be ES, PS or TS.
video/MP1S, video/MP2P and video/MP2T are more specific/better
specified (but should only be used internally or in SDPs).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25d994923ddb802c4814a22de2afbe54ebee8271
---

 modules/access/dshow/dshow.cpp |    2 +-
 modules/access/vcd/vcd.c       |    2 +-
 modules/access/vcdx/access.c   |    2 +-
 modules/access/vdr.c           |    2 +-
 src/input/demux.c              |    3 ++-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 999c8ac..227c109 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1928,7 +1928,7 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
         if( p_stream->i_fourcc == VLC_CODEC_DV )
             *type = strdup( "video/dv" );
         else if( p_stream->i_fourcc == VLC_CODEC_MPGV )
-            *type = strdup( "video/mpeg" );
+            *type = strdup( "video/MP2P" );
         else
             return VLC_EGENERIC;
         break;
diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c
index b218ffe..c867292 100644
--- a/modules/access/vcd/vcd.c
+++ b/modules/access/vcd/vcd.c
@@ -275,7 +275,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
 
         case ACCESS_GET_CONTENT_TYPE:
-            *va_arg( args, char ** ) = strdup("video/mpeg");
+            *va_arg( args, char ** ) = strdup("video/MP2P");
             break;
 
         case ACCESS_SET_TITLE:
diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c
index a572552..16853cf 100644
--- a/modules/access/vcdx/access.c
+++ b/modules/access/vcdx/access.c
@@ -1082,7 +1082,7 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
         break;
 
     case ACCESS_GET_CONTENT_TYPE:
-        *va_arg( args, char ** ) = strdup( "video/mpeg" );
+        *va_arg( args, char ** ) = strdup( "video/MP2P" );
         break;
 
     case ACCESS_SET_TITLE:
diff --git a/modules/access/vdr.c b/modules/access/vdr.c
index 4c71bc1..3a11475 100644
--- a/modules/access/vdr.c
+++ b/modules/access/vdr.c
@@ -308,7 +308,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_CONTENT_TYPE:
             *va_arg( args, char ** ) =
-                strdup( p_sys->b_ts_format ? "video/MP2T" : "video/mpeg" );
+                strdup( p_sys->b_ts_format ? "video/MP2T" : "video/MP2P" );
             break;
 
         case ACCESS_SET_TITLE:
diff --git a/src/input/demux.c b/src/input/demux.c
index 5bf960f..a54a2be 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -59,9 +59,10 @@ static const char *demux_FromContentType(const char *mime)
         { "audio/aacp",          "m4a"     },
         { "audio/mpeg",          "mp3"     },
         { "application/rss+xml", "podcast" },
+        //{ "video/MP1S",          "es,mpgv" }, !b_force
+        { "video/MP2P",          "ps"      },
         { "video/MP2T",          "ts"      },
         { "video/dv",            "rawdv"   },
-        { "video/mpeg",          "ps"      },
         { "video/nsa",           "nsv"     },
         { "video/nsv",           "nsv"     },
     };



More information about the vlc-commits mailing list