Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a comma

Aperta Adatta ai principianti
#2,020 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Il valore di rotazione viene interpretato con la cultura corrente in QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs e di nuovo in QuickLook.Plugin.VideoViewer/Plugin.cs per il dimensionamento della finestra. Inizia da queste due chiamate a double.TryParse sul campo "Rotation" di MediaInfo. È completato quando entrambe effettuano il parsing con CultureInfo.InvariantCulture e NumberStyles.Float, e una locale ru-RU mostra un video verticale dritto. Verifica se il workaround esistente rotation /= 1e3 è ancora valido.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug Portrait videos recorded on iPhone (stored as 1920x1080 with a rotation flag) are previewed sideways. This is likely the root cause of #762, which was closed without being reproduced.

Cause MediaInfo returns the rotation as "90.000". The VideoViewer parses it with the current culture:

QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs — double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
QuickLook.Plugin.VideoViewer/Plugin.cs — same call for the window size
When the decimal separator is a comma (ru-RU, uk-UA, many other locales), "90.000" fails to parse, so rotation stays 0 and no rotation is applied. With a dot as the group separator (de-DE etc.), it parses as 90000. The existing if (rotation > 360) rotation /= 1e3; workaround covers that case, but not the comma-separator case.

Proposed fix Parse the value with the invariant culture in both places:

double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"),
NumberStyles.Float, CultureInfo.InvariantCulture, out var rotation);
After this change, the /= 1e3 workaround is probably no longer needed.

To Reproduce

Windows region format ru-RU (decimal separator ,).
Take a portrait iPhone video (HEVC .MOV, rotation=-90 in ffprobe, MediaInfo Rotation = 90.000).
Preview it in QuickLook. It is shown sideways.
Change the decimal separator to . and restart QuickLook. It is shown correctly.
Environment

Windows 11 Home 24H2 (10.0.26100)
QuickLook 4.5.0.0 (Microsoft Store)

Lingua principale
C#
Stelle
25.2k
Fork
1.3k
Merge medio
10g 4h
PR unite (30g)
2

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QL-Win/QuickLook

Tutte le issue di QL-Win/QuickLook

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.