aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
authornyanmisaka <nst799610810@gmail.com>2026-05-09 15:11:04 +0800
committernyanmisaka <nst799610810@gmail.com>2026-05-09 15:20:29 +0800
commitfc251265d9aff78b24c729b87cded9a25a349e30 (patch)
tree82bf8cb36560282de2406dfa4ae0bef4126fae8a /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
parent5cb6ac521a213ab13cef5e28ffa07e43dd073913 (diff)
Check videoRotation in video stream copy
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index a0e04eae63..04b13a6f3c 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -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))