From 929dbe9d14c9582cb06c32d750c7efd184c312ae Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Sun, 21 Feb 2021 18:49:38 +0100 Subject: [PATCH] Try to fix #762: video rotation metadata is not consistent across platforms --- QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs index 4794940..a2c353a 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Plugin.cs @@ -82,6 +82,9 @@ namespace QuickLook.Plugin.VideoViewer int.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Width"), out var width); int.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Height"), out var height); double.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Rotation"), out var rotation); + // Correct rotation: on some machine the value "90" becomes "90000" by some reason + if (rotation > 360) + rotation /= 1e3; var windowSize = new Size {