mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Try to fix #762: video rotation metadata is not consistent across platforms
This commit is contained in:
@@ -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, "Width"), out var width);
|
||||||
int.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Height"), out var height);
|
int.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Height"), out var height);
|
||||||
double.TryParse(_mediaInfo?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
|
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
|
var windowSize = new Size
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user