mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
...
This commit is contained in:
1 parent
65aa23049e
commit
cc679f5735
1 file changed
+6
-2
@@ -750,12 +750,16 @@ export class FluxerAudioBridge extends EventEmitter {
|
||||
if (generation !== this._playGeneration) return "stopped";
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
proc.once("close", (code) => {
|
||||
if (!hasOutput && code !== 0 && !this._stopped) {
|
||||
proc.once("close", (code, signal) => {
|
||||
logger.player("[AudioBridge] FFmpeg process closed (code=" + code + ", signal=" + signal + ", hasOutput=" + hasOutput + ")");
|
||||
if ((!hasOutput || code !== 0) && !this._stopped) {
|
||||
const errLine = stderrBuf.split("\n").filter(Boolean).pop() || "Process exited with code " + code;
|
||||
logger.warn("[AudioBridge] FFmpeg non-zero close: " + errLine);
|
||||
if (!hasOutput) {
|
||||
reject(new Error("[FFmpeg] " + errLine));
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
this._awaitEnd(durationMs).then(resolve, reject);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user