Skip to content

Commit

Permalink
Adjust parsed TS AVC samples when start PTS overlaps with last DTS
Browse files Browse the repository at this point in the history
Resolves #5477
  • Loading branch information
robwalch committed May 23, 2023
1 parent 41a2f12 commit 69784cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remux/mp4-remuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export default class MP4Remuxer implements Remuxer {
)} ms (${delta}dts) overlapping between fragments detected`
);
}
if (!foundOverlap || nextAvcDts > inputSamples[0].pts) {
if (!foundOverlap || nextAvcDts >= inputSamples[0].pts) {
firstDTS = nextAvcDts;
const firstPTS = inputSamples[0].pts - delta;
inputSamples[0].dts = firstDTS;
Expand Down

0 comments on commit 69784cc

Please sign in to comment.