Skip to content

Commit

Permalink
Fix videos with near-60 fps being rejected (mastodon#14684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and thenameisnigel-old committed Sep 7, 2020
1 parent 5abe7b2 commit 89ce7bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/media_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def check_video_dimensions

raise Mastodon::StreamValidationError, 'Video has no video stream' if movie.width.nil? || movie.frame_rate.nil?
raise Mastodon::DimensionsValidationError, "#{movie.width}x#{movie.height} videos are not supported" if movie.width * movie.height > MAX_VIDEO_MATRIX_LIMIT
raise Mastodon::DimensionsValidationError, "#{movie.frame_rate.to_i}fps videos are not supported" if movie.frame_rate > MAX_VIDEO_FRAME_RATE
raise Mastodon::DimensionsValidationError, "#{movie.frame_rate.floor}fps videos are not supported" if movie.frame_rate.floor > MAX_VIDEO_FRAME_RATE
end

def set_meta
Expand Down

0 comments on commit 89ce7bb

Please sign in to comment.