We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 050cc7b commit e20a902Copy full SHA for e20a902
lib/mp4/transmuxer.js
@@ -819,9 +819,18 @@ CoalesceStream.prototype.flush = function() {
819
i;
820
821
// Return until we have enough tracks from the pipeline to remux
822
- if (this.pendingTracks.length === 0 ||
823
- (this.remuxTracks && this.pendingTracks.length < this.numberOfTracks)) {
824
- return;
+ if (this.pendingTracks.length < this.numberOfTracks) {
+ if (this.remuxTracks) {
+ return;
825
+ } else if (this.pendingTracks.length === 0) {
826
+ this.emittedTracks++;
827
+
828
+ if (this.emittedTracks >= this.numberOfTracks) {
829
+ this.trigger('done');
830
+ this.emittedTracks = 0;
831
+ }
832
833
834
}
835
836
if (this.videoTrack) {
0 commit comments