Improve detection of corrupt videos via ffprobe

This commit is contained in:
Calvin Walton 2016-09-06 18:15:31 -04:00
parent f112be7638
commit c730681183

View File

@ -281,6 +281,9 @@ module BigBlueButton
info[:width] = info[:video][:width].to_i info[:width] = info[:video][:width].to_i
info[:height] = info[:video][:height].to_i info[:height] = info[:video][:height].to_i
return {} if info[:width] == 0 or info[:height] == 0
return {} if info[:video][:display_aspect_ratio] == '0:0'
info[:aspect_ratio] = info[:video][:display_aspect_ratio].to_r info[:aspect_ratio] = info[:video][:display_aspect_ratio].to_r
if info[:aspect_ratio] == 0 if info[:aspect_ratio] == 0
info[:aspect_ratio] = Rational(info[:width], info[:height]) info[:aspect_ratio] = Rational(info[:width], info[:height])