Lots of bugs

This commit is contained in:
freddyaboulton
2024-10-11 13:01:26 -07:00
parent d681dbfd7e
commit 23b1e20c05
13 changed files with 214 additions and 241 deletions

View File

@@ -1,10 +1,15 @@
import time
import fractions
import av
import asyncio
import fractions
import threading
import time
from typing import Callable
import av
import logging
logger = logging.getLogger(__name__)
AUDIO_PTIME = 0.020
@@ -39,7 +44,7 @@ def player_worker_decode(
frame = next(generator)
except Exception as exc:
if isinstance(exc, StopIteration):
print("Not iterating")
logger.debug("Stopping audio stream")
asyncio.run_coroutine_threadsafe(queue.put(None), loop)
thread_quit.set()
break