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
+8
-4
@@ -750,11 +750,15 @@ export class FluxerAudioBridge extends EventEmitter {
|
|||||||
if (generation !== this._playGeneration) return "stopped";
|
if (generation !== this._playGeneration) return "stopped";
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
proc.once("close", (code) => {
|
proc.once("close", (code, signal) => {
|
||||||
if (!hasOutput && code !== 0 && !this._stopped) {
|
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;
|
const errLine = stderrBuf.split("\n").filter(Boolean).pop() || "Process exited with code " + code;
|
||||||
reject(new Error("[FFmpeg] " + errLine));
|
logger.warn("[AudioBridge] FFmpeg non-zero close: " + errLine);
|
||||||
return;
|
if (!hasOutput) {
|
||||||
|
reject(new Error("[FFmpeg] " + errLine));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this._awaitEnd(durationMs).then(resolve, reject);
|
this._awaitEnd(durationMs).then(resolve, reject);
|
||||||
|
|||||||
Reference in new issue
Block a user