Skip to content

Commit

Permalink
Set flush param for Demuxer.demux depending on progressive mode config
Browse files Browse the repository at this point in the history
  • Loading branch information
softworkz committed Apr 13, 2021
1 parent 96fb735 commit 1404009
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/demux/transmuxer.ts
Expand Up @@ -347,7 +347,12 @@ export default class Transmuxer {
chunkMeta: ChunkMetadata
): TransmuxerResult {
const { audioTrack, avcTrack, id3Track, textTrack } = (this
.demuxer as Demuxer).demux(data, timeOffset, false);
.demuxer as Demuxer).demux(
data,
timeOffset,
false,
!this.config.progressive
);
const remuxResult = this.remuxer!.remux(
audioTrack,
avcTrack,
Expand Down
7 changes: 6 additions & 1 deletion src/demux/tsdemuxer.ts
Expand Up @@ -486,7 +486,12 @@ class TSDemuxer implements Demuxer {
keyData: KeyData,
timeOffset: number
): Promise<DemuxerResult> {
const demuxResult = this.demux(data, timeOffset, true);
const demuxResult = this.demux(
data,
timeOffset,
true,
!this.config.progressive
);
const sampleAes = (this.sampleAes = new SampleAesDecrypter(
this.observer,
this.config,
Expand Down
3 changes: 2 additions & 1 deletion src/types/demuxer.ts
Expand Up @@ -2,7 +2,8 @@ export interface Demuxer {
demux(
data: Uint8Array,
timeOffset: number,
isSampleAes?: boolean
isSampleAes?: boolean,
flush?: boolean
): DemuxerResult;
demuxSampleAes(
data: Uint8Array,
Expand Down

0 comments on commit 1404009

Please sign in to comment.