mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-13 12:16:49 +01:00
Check videoRotation in video stream copy
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
@@ -2466,6 +2466,17 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
}
|
||||
|
||||
var requestedRotations = state.GetRequestedRotations(videoStream.Codec);
|
||||
if (requestedRotations.Length > 0)
|
||||
{
|
||||
var rotation = state.VideoStream?.Rotation ?? 0;
|
||||
if (rotation != 0
|
||||
&& !requestedRotations.Contains(rotation.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Video width must fall within requested value
|
||||
if (request.MaxWidth.HasValue
|
||||
&& (!videoStream.Width.HasValue || videoStream.Width.Value > request.MaxWidth.Value))
|
||||
|
||||
Reference in New Issue
Block a user