diff options
| author | 2026-09-14 08:57:42 -0400 | |
|---|---|---|
| committer | 2026-09-14 08:57:42 -0400 | |
| commit | 8f208c26b6fa1a9f3372679c047cab559c06e26b (patch) | |
| tree | 323d894d6ff8e1ed1445c40cb1e2f5d3cee5e8e8 /src/buffer/common_internal.h | |
| parent | c66c7c64ebd16287b892f8a780cffcabafba3799 (diff) | |
| download | camu-8f208c26b6fa1a9f3372679c047cab559c06e26b.tar.gz camu-8f208c26b6fa1a9f3372679c047cab559c06e26b.tar.bz2 camu-8f208c26b6fa1a9f3372679c047cab559c06e26b.zip | |
Server-side fixes from DIRECT_MODE testing
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/buffer/common_internal.h')
| -rw-r--r-- | src/buffer/common_internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buffer/common_internal.h b/src/buffer/common_internal.h index a9e6ece..6685a3e 100644 --- a/src/buffer/common_internal.h +++ b/src/buffer/common_internal.h @@ -17,6 +17,17 @@ enum { ERRORED }; +//#define CAMU_BUFFER_SPORADIC_ERRORS +#ifdef CAMU_BUFFER_SPORADIC_ERRORS +#include <al/random.h> +#define ROLL_FOR_BUFFER_ERROR(buf) do { \ + if (al_random_int(0, 254) == 72) { \ + log_warn("Random buffer error proc."); \ + atomic_store(u32)(&(buf)->flow, FLUSHED_ERROR, AL_ATOMIC_RELAXED); \ + } \ +} while (0) +#endif + static inline bool frame_is_late(struct camu_clock *clock, f64 base, f64 pts, f64 duration) { return pts + duration < ((base == -1.0) ? camu_clock_get_base_pts(clock) : base); |