Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ef1c74f6
authored
2015-05-26 14:40:22 +0200
by
Jernej Fijačko
Committed by
David LaPalomento
2015-05-28 16:59:16 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Allow playback of content with network PID entries inside PAT
1 parent
ad2140d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
src/segment-parser.js
src/segment-parser.js
View file @
ef1c74f
...
...
@@ -221,6 +221,9 @@
patTableId
,
// :int
patCurrentNextIndicator
,
// Boolean
patSectionLength
,
// :uint
patNumEntries
,
// :uint
patNumPrograms
,
// :uint
patProgramOffset
,
// :uint
pesPacketSize
,
// :int,
dataAlignmentIndicator
,
// :Boolean,
...
...
@@ -302,9 +305,22 @@
// raise an exception if we encounter one
// section_length = rest of header + (n * entry length) + CRC
// = 5 + (n * 4) + 4
if
((
patSectionLength
-
5
-
4
)
/
4
!==
1
)
{
patNumEntries
=
(
patSectionLength
-
5
-
4
)
/
4
;
patNumPrograms
=
0
;
patProgramOffset
=
offset
;
for
(
var
entryIndex
=
0
;
entryIndex
<
patNumEntries
;
entryIndex
++
)
{
// network PID program number equals 0 and can be ignored
if
(((
data
[
offset
+
4
*
entryIndex
])
<<
8
|
data
[
offset
+
4
*
entryIndex
+
1
])
>
0
)
{
patNumPrograms
++
;
patProgramOffset
=
offset
+
4
*
entryIndex
;
}
}
if
(
patNumPrograms
!==
1
)
{
throw
new
Error
(
"TS has more that 1 program"
);
}
else
{
offset
=
patProgramOffset
;
}
// the Program Map Table (PMT) associates the underlying
// video and audio streams with a unique PID
...
...
Please
register
or
sign in
to post a comment