bugfix
This commit is contained in:
parent
7199fcb0af
commit
ebc27fc306
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user