mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
server: fixes wav not saved correctly and mp3 generation invalid if started from /tmp from another device
This commit is contained in:
@@ -26,13 +26,13 @@ class AudioFileWriterProcessor(Processor):
|
||||
self.out_stream = self.out_container.add_stream(
|
||||
"pcm_s16le", rate=data.sample_rate
|
||||
)
|
||||
for packet in self.out_stream.encode(data):
|
||||
self.out_container.mux(packet)
|
||||
for packet in self.out_stream.encode(data):
|
||||
self.out_container.mux(packet)
|
||||
await self.emit(data)
|
||||
|
||||
async def _flush(self):
|
||||
if self.out_container:
|
||||
for packet in self.out_stream.encode(None):
|
||||
for packet in self.out_stream.encode():
|
||||
self.out_container.mux(packet)
|
||||
self.out_container.close()
|
||||
self.out_container = None
|
||||
|
||||
Reference in New Issue
Block a user