From ed88bcaac0809f321319532c9d4fd91aacaac164 Mon Sep 17 00:00:00 2001 From: bastimeyer Date: Thu, 10 Nov 2022 14:14:25 +0100 Subject: [PATCH] stream.hls: add more debug messages to write calls --- src/streamlink/stream/hls.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/streamlink/stream/hls.py b/src/streamlink/stream/hls.py index 6da0105e..90c99550 100644 --- a/src/streamlink/stream/hls.py +++ b/src/streamlink/stream/hls.py @@ -203,6 +203,7 @@ class HLSStreamWriter(SegmentedStreamWriter): def write(self, sequence: Sequence, result: Response, *data): if not self.should_filter_sequence(sequence): + log.debug(f"Writing segment {sequence.num} to output") try: return self._write(sequence, result, *data) finally: @@ -212,6 +213,8 @@ class HLSStreamWriter(SegmentedStreamWriter): self.reader.filter_event.set() else: + log.debug(f"Discarding segment {sequence.num}") + # Read and discard any remaining HTTP response data in the response connection. # Unread data in the HTTPResponse connection blocks the connection from being released back to the pool. result.raw.drain_conn()