Skip to content

Commit

Permalink
using PTS for DTS, and remove compareTagsPTS
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Sep 15, 2015
1 parent f9fcb2a commit ee5ed3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/org/mangui/hls/demux/TSDemuxer.as
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ package org.mangui.hls.demux {
};

// add a new FLVTag with the onCaptionInfo call
var tag:FLVTag = new FLVTag(FLVTag.METADATA, pes.pts, pes.dts, false);
var tag:FLVTag = new FLVTag(FLVTag.METADATA, pes.pts, pes.pts, false);

var data : ByteArray = new ByteArray();
data.objectEncoding = ObjectEncoding.AMF0;
Expand Down
13 changes: 1 addition & 12 deletions src/org/mangui/hls/stream/StreamBuffer.as
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ package org.mangui.hls.stream {
}

if(metaAppended) {
_metaTags = _metaTags.sort(compareTagsPTS);
_metaTags = _metaTags.sort(compareTags);
}


Expand Down Expand Up @@ -359,17 +359,6 @@ package org.mangui.hls.stream {
}
}

private function compareTagsPTS(x : FLVData, y : FLVData) : Number {
if (x.continuity != y.continuity) {
return (x.continuity - y.continuity);
} else {
if (x.tag.pts != y.tag.pts) {
return (x.tag.pts - y.tag.pts);
} else {
return (gettagrank(x.tag) - gettagrank(y.tag));
}
}
}
/*
helper function used to sort tags, lower values have highest priority
*/
Expand Down

0 comments on commit ee5ed3e

Please sign in to comment.