Fix no streams reported from Piped (#974)

Piped currently is having an issue it would only return a muxed 360p
stream, and it is rejected here because the audioCodec being set to nil.
This commit is contained in:
Ray Cheung
2026-08-23 18:22:10 +08:00
committed by GitHub
parent d46002e99a
commit 3ebae6d216

View File

@@ -672,12 +672,14 @@ private struct PipedVideoStream: Decodable, Sendable {
resolution = nil resolution = nil
} }
let audioCodec: String? = (videoOnly ?? true) ? nil : "aac"
return Stream( return Stream(
url: streamUrl, url: streamUrl,
resolution: resolution, resolution: resolution,
format: format ?? "unknown", format: format ?? "unknown",
videoCodec: codec, videoCodec: codec,
audioCodec: nil, audioCodec: audioCodec,
bitrate: bitrate, bitrate: bitrate,
fileSize: contentLength, fileSize: contentLength,
isAudioOnly: false, isAudioOnly: false,