mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-28 20:05:10 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user