Skip to content

Commit

Permalink
Merge pull request #2960 from video-dev/bugfix/drop-bad-audio-samples
Browse files Browse the repository at this point in the history
Fix audio remuxer out of sequence sample drop regression
  • Loading branch information
robwalch committed Aug 7, 2020
2 parents f538668 + bf95cdd commit b1041aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remux/mp4-remuxer.js
Expand Up @@ -520,7 +520,7 @@ class MP4Remuxer {

// If we're overlapping by more than a duration, drop this sample
if (delta <= -maxAudioFramesDrift * inputSampleDuration) {
if (contiguous) {
if (contiguous || i > 0) {
logger.warn(`Dropping 1 audio frame @ ${toMsFromMpegTsClock(nextPts, true) / 1000}s due to ${toMsFromMpegTsClock(delta, true)} ms overlap.`);
inputSamples.splice(i, 1);
// Don't touch nextPtsNorm or i
Expand Down

0 comments on commit b1041aa

Please sign in to comment.