Skip to content

Commit

Permalink
Patch eris missing callback cause 'end' not emit
Browse files Browse the repository at this point in the history
  • Loading branch information
james58899 committed May 12, 2024
1 parent a1e2d49 commit c1eda1a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions patches/eris+0.17.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ index 7160c6c..4d4917c 100644
super(options);
this.manualCB = false;
diff --git a/node_modules/eris/lib/voice/streams/OggOpusTransformer.js b/node_modules/eris/lib/voice/streams/OggOpusTransformer.js
index 6c4baed..204a05e 100644
index 6c4baed..20cb135 100644
--- a/node_modules/eris/lib/voice/streams/OggOpusTransformer.js
+++ b/node_modules/eris/lib/voice/streams/OggOpusTransformer.js
@@ -8,6 +8,7 @@ class OggOpusTransformer extends BaseTransformer {
Expand Down Expand Up @@ -114,7 +114,7 @@ index 6c4baed..204a05e 100644
this.push(segment);
}
} else if(byte === "OpusHead") {
@@ -71,6 +72,12 @@ class OggOpusTransformer extends BaseTransformer {
@@ -71,12 +72,19 @@ class OggOpusTransformer extends BaseTransformer {
this.emit("debug", "Invalid codec: " + byte);
}
}
Expand All @@ -126,4 +126,12 @@ index 6c4baed..204a05e 100644
+ }
}

_final() {
- _final() {
+ _final(cb) {
if(!this._bitstream) {
this.emit("error", new Error("No Opus stream was found"));
}
+ cb();
}

_transform(chunk, enc, cb) {

0 comments on commit c1eda1a

Please sign in to comment.