From ebc27fc306aaaf04dcda6e9307c7876b6778ad14 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 11 Sep 2024 11:13:33 +0800 Subject: [PATCH] bugfix --- rtcllm/aav.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rtcllm/aav.py b/rtcllm/aav.py index ac0ff64..069aa5b 100644 --- a/rtcllm/aav.py +++ b/rtcllm/aav.py @@ -14,12 +14,11 @@ class MyAudioStreamTrack(AudioStreamTrack): self.source = source async def recv(self): - print('MyAudioTrack::recv(): called') - if self.source is None: return None f = await self.source.audio.recv() while f is None: + print('MyAudioTrack::recv(): will reload source') self.set_source(MyMediaPlayer(self.source._file_path)) f = await self.source.audio.recv() return f @@ -33,11 +32,11 @@ class MyVideoStreamTrack(VideoStreamTrack): self.source = source async def recv(self): - print('MyVideoTrack::recv(): called') if self.source is None: return None f = await self.source.video.recv() while f is None: + print('MyVideoTrack::recv(): will reload source') self.set_source(MyMediaPlayer(self.source._file_path)) f = await self.source.video.recv() return f