[vlc-commits] demux: adaptative: always fallback on representation format

Francois Cartegnie git at videolan.org
Tue Sep 22 00:38:51 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 16 23:19:22 2015 +0200| [11969bc54f56de3f8d8a18a775f2e29173ed6ba4] | committer: Francois Cartegnie

demux: adaptative: always fallback on representation format

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

 modules/demux/adaptative/playlist/BaseAdaptationSet.cpp |    5 ++++-
 modules/demux/dash/mpd/AdaptationSet.cpp                |   10 +---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/demux/adaptative/playlist/BaseAdaptationSet.cpp b/modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
index a4c34a4..3471e15 100644
--- a/modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
+++ b/modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
@@ -54,7 +54,10 @@ BaseAdaptationSet::~BaseAdaptationSet   ()
 
 StreamFormat BaseAdaptationSet::getStreamFormat() const
 {
-    return StreamFormat();
+    if (!representations.empty())
+        return representations.front()->getStreamFormat();
+    else
+        return StreamFormat();
 }
 
 std::vector<BaseRepresentation*>& BaseAdaptationSet::getRepresentations()
diff --git a/modules/demux/dash/mpd/AdaptationSet.cpp b/modules/demux/dash/mpd/AdaptationSet.cpp
index f6ce48f..8b12c15 100644
--- a/modules/demux/dash/mpd/AdaptationSet.cpp
+++ b/modules/demux/dash/mpd/AdaptationSet.cpp
@@ -43,17 +43,9 @@ AdaptationSet::~AdaptationSet()
 StreamFormat AdaptationSet::getStreamFormat() const
 {
     if(!getMimeType().empty())
-    {
         return DASHStreamFormat::mimeToFormat(getMimeType());
-    }
-    else if (!representations.empty())
-    {
-        return representations.front()->getStreamFormat();
-    }
     else
-    {
-        return StreamFormat();
-    }
+        return BaseAdaptationSet::getStreamFormat();
 }
 
 bool AdaptationSet::getSubsegmentAlignmentFlag() const



More information about the vlc-commits mailing list