From bf97144c06b44ce602947f95bc5114345f76454f Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Wed, 21 Jan 2026 16:49:40 -0500 Subject: [PATCH] Restore guards (fix 'main' regression) --- av/audio/fifo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/av/audio/fifo.py b/av/audio/fifo.py index 14673527e..953d24edc 100644 --- a/av/audio/fifo.py +++ b/av/audio/fifo.py @@ -192,15 +192,21 @@ def read_many(self, samples: cython.int, partial: cython.bint = False): @property def format(self): """The :class:`.AudioFormat` of this FIFO.""" + if not self.ptr: + raise AttributeError(f"'{__name__}.AudioFifo' object has no attribute 'format'") return self.template.format @property def layout(self): """The :class:`.AudioLayout` of this FIFO.""" + if not self.ptr: + raise AttributeError(f"'{__name__}.AudioFifo' object has no attribute 'layout'") return self.template.layout @property def sample_rate(self): + if not self.ptr: + raise AttributeError(f"'{__name__}.AudioFifo' object has no attribute 'sample_rate'") return self.template.sample_rate @property