diff --git a/livekit-rtc/livekit/rtc/audio_resampler.py b/livekit-rtc/livekit/rtc/audio_resampler.py index a8559b87..4d4c02c5 100644 --- a/livekit-rtc/livekit/rtc/audio_resampler.py +++ b/livekit-rtc/livekit/rtc/audio_resampler.py @@ -94,6 +94,8 @@ def push(self, data: bytearray | AudioFrame) -> list[AudioFrame]: Exception: If there is an error during resampling. """ bdata = data if isinstance(data, bytearray) else data.data.cast("b") + if not bdata: + return [] req = proto_ffi.FfiRequest() req.push_sox_resampler.resampler_handle = self._ffi_handle.handle