[vlc-devel] [PATCH] adaptive: rename ALTERNATE to ALTERNATIVE

Steve Lhomme robux4 at ycbcr.xyz
Mon May 20 11:34:05 CEST 2019


The name collides with a define in wingdi.h
---
 modules/demux/adaptive/playlist/Role.cpp   | 2 +-
 modules/demux/adaptive/playlist/Role.hpp   | 4 ++--
 modules/demux/dash/mpd/IsoffMainParser.cpp | 2 +-
 modules/demux/hls/playlist/Parser.cpp      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/demux/adaptive/playlist/Role.cpp b/modules/demux/adaptive/playlist/Role.cpp
index 828455a571..bc3f58ee8c 100644
--- a/modules/demux/adaptive/playlist/Role.cpp
+++ b/modules/demux/adaptive/playlist/Role.cpp
@@ -44,7 +44,7 @@ bool Role::isDefault() const
 bool Role::autoSelectable() const
 {
     return value == MAIN ||
-           value == ALTERNATE ||
+           value == ALTERNATIVE ||
            value == SUBTITLE ||
            value == CAPTION;
 }
diff --git a/modules/demux/adaptive/playlist/Role.hpp b/modules/demux/adaptive/playlist/Role.hpp
index 6b703c7d85..4b4d339cd9 100644
--- a/modules/demux/adaptive/playlist/Role.hpp
+++ b/modules/demux/adaptive/playlist/Role.hpp
@@ -28,13 +28,13 @@ namespace adaptive
         {
             public:
                 static const unsigned MAIN           = 0;
-                static const unsigned ALTERNATE      = 1;
+                static const unsigned ALTERNATIVE    = 1;
                 static const unsigned SUPPLEMENTARY  = 2;
                 static const unsigned COMMENTARY     = 3;
                 static const unsigned DUB            = 4;
                 static const unsigned CAPTION        = 5;
                 static const unsigned SUBTITLE       = 6;
-                Role(unsigned = ALTERNATE);
+                Role(unsigned = ALTERNATIVE);
                 bool operator==(const Role &) const;
                 bool isDefault() const;
                 bool autoSelectable() const;
diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index b2ae86d440..86e39fedef 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -254,7 +254,7 @@ void    IsoffMainParser::parseAdaptationSets  (Node *periodNode, Period *period)
                 if(rolevalue == "main")
                     adaptationSet->setRole(Role::MAIN);
                 else if(rolevalue == "alternate")
-                    adaptationSet->setRole(Role::ALTERNATE);
+                    adaptationSet->setRole(Role::ALTERNATIVE);
                 else if(rolevalue == "supplementary")
                     adaptationSet->setRole(Role::SUPPLEMENTARY);
                 else if(rolevalue == "commentary")
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index d1fdd8e478..52de376638 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -507,7 +507,7 @@ M3U8 * M3U8Parser::parse(vlc_object_t *p_object, stream_t *p_stream, const std::
                     if(pair.second->getAttributeByName("DEFAULT")->value == "YES")
                         altAdaptSet->setRole(Role(Role::MAIN));
                     else
-                        altAdaptSet->setRole(Role(Role::ALTERNATE));
+                        altAdaptSet->setRole(Role(Role::ALTERNATIVE));
                 }
 
                 if(pair.second->getAttributeByName("AUTOSELECT"))
-- 
2.17.1



More information about the vlc-devel mailing list