Skip to content

Commit

Permalink
Fix AAC frame-trimming algorithm
Browse files Browse the repository at this point in the history
Only trim AAC frames if the current segment will end up with negative baseMediaDecodeTime calculation in the calculateTrackBaseMediaDecodeTime function. This serves to cull AAC frames that occur before the video at the beginning of a video so that all videos start at 0 but leaves intact AAC frames for any other segments.
  • Loading branch information
jrivera authored and dmlap committed Nov 25, 2015
1 parent 34e993f commit df1c40d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mp4/transmuxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ AudioSegmentStream = function(track) {
};

this.setEarliestDts = function (earliestDts) {
earliestAllowedDts = earliestDts;
earliestAllowedDts = earliestDts - track.timelineStartInfo.baseMediaDecodeTime;
};

this.flush = function() {
Expand Down

0 comments on commit df1c40d

Please sign in to comment.