mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
Check videoRotation in video stream copy
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
5cb6ac521a
commit
fc251265d9
3 changed files with 41 additions and 36 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue