fix(drm): handle non-UTF-8 output from shaka-packager stderr

Shaka-packager can emit non-UTF-8 bytes in its log output, causing UnicodeDecodeError when reading stderr in text mode. Use explicit errors="replace" encoding. Also harden try_ensure_utf8 fallback paths to always return valid UTF-8 instead of raw bytes.
This commit is contained in:
imSp4rky
2026-04-12 22:19:44 +00:00
parent 8bdb942234
commit 2e7fc1720d
2 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -421,7 +421,9 @@ class PlayReady:
[binaries.ShakaPackager, *arguments],
stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE,
universal_newlines=True,
text=True,
encoding="utf-8",
errors="replace",
)
stream_skipped = False