[vlc-commits] demux: adaptative: enforce timeline timescale
Francois Cartegnie
git at videolan.org
Tue Oct 27 19:13:55 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 26 14:51:37 2015 +0100| [e89408b6f7a88bcf11ab94f2c39255340b56a58a] | committer: Francois Cartegnie
demux: adaptative: enforce timeline timescale
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e89408b6f7a88bcf11ab94f2c39255340b56a58a
---
modules/demux/adaptative/playlist/SegmentTimeline.cpp | 6 ++++++
modules/demux/adaptative/playlist/SegmentTimeline.h | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/demux/adaptative/playlist/SegmentTimeline.cpp b/modules/demux/adaptative/playlist/SegmentTimeline.cpp
index 37d0b7b..f83909f 100644
--- a/modules/demux/adaptative/playlist/SegmentTimeline.cpp
+++ b/modules/demux/adaptative/playlist/SegmentTimeline.cpp
@@ -32,6 +32,12 @@ SegmentTimeline::SegmentTimeline(TimescaleAble *parent)
{
}
+SegmentTimeline::SegmentTimeline(uint64_t scale)
+ :TimescaleAble(NULL)
+{
+ timescale.Set(scale);
+}
+
SegmentTimeline::~SegmentTimeline()
{
std::list<Element *>::iterator it;
diff --git a/modules/demux/adaptative/playlist/SegmentTimeline.h b/modules/demux/adaptative/playlist/SegmentTimeline.h
index a6ed99c..6cdc409 100644
--- a/modules/demux/adaptative/playlist/SegmentTimeline.h
+++ b/modules/demux/adaptative/playlist/SegmentTimeline.h
@@ -41,7 +41,8 @@ namespace adaptative
class Element;
public:
- SegmentTimeline(TimescaleAble * = NULL);
+ SegmentTimeline(TimescaleAble *);
+ SegmentTimeline(uint64_t);
virtual ~SegmentTimeline();
void addElement(uint64_t, stime_t d, uint64_t r = 0, stime_t t = 0);
uint64_t getElementNumberByScaledPlaybackTime(stime_t) const;
More information about the vlc-commits
mailing list