[vlc-commits] demux:hls: explictly use MPEG conversion macros for MPEG times
Steve Lhomme
git at videolan.org
Tue Sep 18 14:08:08 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 11 11:15:30 2018 +0200| [a8a5740c5951f5e94eb07761acf08236f6b682f2] | committer: Steve Lhomme
demux:hls: explictly use MPEG conversion macros for MPEG times
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8a5740c5951f5e94eb07761acf08236f6b682f2
---
modules/demux/Makefile.am | 3 ++-
modules/demux/hls/HLSStreams.cpp | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index be6ed770fa..39fc137191 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -428,7 +428,8 @@ libadaptive_hls_SOURCES = \
demux/hls/HLSManager.hpp \
demux/hls/HLSManager.cpp \
demux/hls/HLSStreams.hpp \
- demux/hls/HLSStreams.cpp
+ demux/hls/HLSStreams.cpp \
+ demux/mpeg/timestamps.h
libadaptive_hls_SOURCES += meta_engine/ID3Tag.h \
meta_engine/ID3Meta.h
diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index 45fe456d27..cdd04a7645 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -25,6 +25,8 @@
#include <vlc_demux.h>
#include <vlc_meta.h>
+#include "../mpeg/timestamps.h"
+
extern "C"
{
#include "../meta_engine/ID3Tag.h"
@@ -74,7 +76,7 @@ int HLSStream::ParseID3PrivTag(const uint8_t *p_payload, size_t i_payload)
{
if(!b_id3_timestamps_offset_set)
{
- const vlc_tick_t i_aac_offset = GetQWBE(&p_payload[45]) * 100 / 9;
+ const vlc_tick_t i_aac_offset = FROM_SCALE_NZ(GetQWBE(&p_payload[45]));
setTimeOffset(i_aac_offset);
b_id3_timestamps_offset_set = true;
}
More information about the vlc-commits
mailing list