[vlc-devel] [PATCH 4/7] dash: simplified chunk initialization

Christopher at mailsrv.uni-klu.ac.at Christopher at mailsrv.uni-klu.ac.at
Mon Feb 20 13:49:22 CET 2012


From: Christopher Mueller <christopher.mueller at itec.aau.at>

---
 .../adaptationlogic/RateBasedAdaptationLogic.cpp   |    1 -
 modules/stream_filter/dash/mpd/Segment.cpp         |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp b/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
index e3b6b06..c331e05 100644
--- a/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+++ b/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
@@ -73,7 +73,6 @@ Chunk*  RateBasedAdaptationLogic::getNextChunk() throw(EOFException)
     {
         Segment *seg = segments.at( this->count );
         Chunk *chunk = seg->toChunk();
-        chunk->setBitrate(rep->getBandwidth());
         //In case of UrlTemplate, we must stay on the same segment.
         if ( seg->isSingleShot() == true )
             this->count++;
diff --git a/modules/stream_filter/dash/mpd/Segment.cpp b/modules/stream_filter/dash/mpd/Segment.cpp
index aa0f834..f133966 100644
--- a/modules/stream_filter/dash/mpd/Segment.cpp
+++ b/modules/stream_filter/dash/mpd/Segment.cpp
@@ -114,6 +114,8 @@ dash::http::Chunk*      Segment::toChunk        ()
         chunk->setUrl(this->sourceUrl);
     }
 
+    chunk->setBitrate(this->parentRepresentation->getBandwidth());
+
     return chunk;
 }
 
-- 
1.7.0.4




More information about the vlc-devel mailing list