mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
force audio stream copy when audio transcoding is not allowed
This commit is contained in:
parent
62b0c2605f
commit
235d341524
@ -1788,6 +1788,19 @@ namespace MediaBrowser.Api.Playback
|
|||||||
{
|
{
|
||||||
state.OutputAudioCodec = "copy";
|
state.OutputAudioCodec = "copy";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If the user doesn't have access to transcoding, then force stream copy, regardless of whether it will be compatible or not
|
||||||
|
var auth = AuthorizationContext.GetAuthorizationInfo(Request);
|
||||||
|
if (!string.IsNullOrWhiteSpace(auth.UserId))
|
||||||
|
{
|
||||||
|
var user = UserManager.GetUserById(auth.UserId);
|
||||||
|
if (!user.Policy.EnableAudioPlaybackTranscoding)
|
||||||
|
{
|
||||||
|
state.OutputAudioCodec = "copy";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AttachMediaSourceInfo(StreamState state,
|
private void AttachMediaSourceInfo(StreamState state,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user