Skip to content

Commit

Permalink
Fix rotated videos
Browse files Browse the repository at this point in the history
  • Loading branch information
po5 committed May 3, 2023
1 parent ca96d8c commit e679f4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/thumbnailer_shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ function Thumbnailer:get_thumbnail_size()
if not (video_width and video_height) then
return nil
end
local rotate = mp.get_property_number("video-params/rotate")
if rotate ~= nil and rotate % 180 == 90 then
video_width, video_height = video_height, video_width
end

local w, h
if video_width > video_height then
Expand Down

0 comments on commit e679f4a

Please sign in to comment.