fix serving incomplete segments

This commit is contained in:
mertalev
2026-05-09 01:44:17 -04:00
parent 530edde7f5
commit 5fcaa6ed6b
+4 -2
View File
@@ -319,10 +319,12 @@ export class TranscodingService extends BaseService {
if (!session.process) { if (!session.process) {
return; return;
} }
this.resumeTranscode(session); // SIGTERM makes it rename .tmp segments to .m4s even if they're still incomplete
session.process.kill(); session.process.kill('SIGKILL');
session.process = null; session.process = null;
session.lastCompletedSegment = null; session.lastCompletedSegment = null;
session.paused = false;
this.logger.debug(`Stopped transcoding for session ${session.id}`);
} }
private pauseTranscode(session: Session) { private pauseTranscode(session: Session) {