Merge pull request #106 from gutworth/ts-dts
write dts to the timestamp part of the flv header, not pts
Showing
1 changed file
with
4 additions
and
4 deletions
... | @@ -289,10 +289,10 @@ hls.FlvTag = function(type, extraData) { | ... | @@ -289,10 +289,10 @@ hls.FlvTag = function(type, extraData) { |
289 | this.bytes[ 2] = (len & 0x0000FF00) >>> 8; | 289 | this.bytes[ 2] = (len & 0x0000FF00) >>> 8; |
290 | this.bytes[ 3] = (len & 0x000000FF) >>> 0; | 290 | this.bytes[ 3] = (len & 0x000000FF) >>> 0; |
291 | // write the Timestamp | 291 | // write the Timestamp |
292 | this.bytes[ 4] = (this.pts & 0x00FF0000) >>> 16; | 292 | this.bytes[ 4] = (this.dts & 0x00FF0000) >>> 16; |
293 | this.bytes[ 5] = (this.pts & 0x0000FF00) >>> 8; | 293 | this.bytes[ 5] = (this.dts & 0x0000FF00) >>> 8; |
294 | this.bytes[ 6] = (this.pts & 0x000000FF) >>> 0; | 294 | this.bytes[ 6] = (this.dts & 0x000000FF) >>> 0; |
295 | this.bytes[ 7] = (this.pts & 0xFF000000) >>> 24; | 295 | this.bytes[ 7] = (this.dts & 0xFF000000) >>> 24; |
296 | // write the StreamID | 296 | // write the StreamID |
297 | this.bytes[ 8] = 0; | 297 | this.bytes[ 8] = 0; |
298 | this.bytes[ 9] = 0; | 298 | this.bytes[ 9] = 0; | ... | ... |
-
Please register or sign in to post a comment