mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 22:15:23 +01:00
Handle rotation is not present in the video metadata (#33261)
This commit is contained in:
parent
a70ae28644
commit
9ba4c8ef66
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class VideoMetadataExtractor
|
||||||
@frame_rate ||= @r_frame_rate
|
@frame_rate ||= @r_frame_rate
|
||||||
# If the video has not been re-encoded by ffmpeg, it may contain rotation information,
|
# If the video has not been re-encoded by ffmpeg, it may contain rotation information,
|
||||||
# and we need to simulate applying it to the dimensions
|
# and we need to simulate applying it to the dimensions
|
||||||
@width, @height = @height, @width if video_stream[:side_data_list]&.any? { |x| x[:rotation].abs == 90 }
|
@width, @height = @height, @width if video_stream[:side_data_list]&.any? { |x| x[:rotation]&.abs == 90 }
|
||||||
end
|
end
|
||||||
|
|
||||||
if (audio_stream = audio_streams.first)
|
if (audio_stream = audio_streams.first)
|
||||||
|
|
Loading…
Reference in a new issue