From c73068118337d4335249cdc5f711cc74a0cc3e56 Mon Sep 17 00:00:00 2001
From: Calvin Walton <calvin.walton@kepstin.ca>
Date: Tue, 6 Sep 2016 18:15:31 -0400
Subject: [PATCH] Improve detection of corrupt videos via ffprobe

---
 record-and-playback/core/lib/recordandplayback/edl/video.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/record-and-playback/core/lib/recordandplayback/edl/video.rb b/record-and-playback/core/lib/recordandplayback/edl/video.rb
index 5057873abc..2e5d142982 100644
--- a/record-and-playback/core/lib/recordandplayback/edl/video.rb
+++ b/record-and-playback/core/lib/recordandplayback/edl/video.rb
@@ -281,6 +281,9 @@ module BigBlueButton
             info[:width] = info[:video][:width].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
             if info[:aspect_ratio] == 0
               info[:aspect_ratio] = Rational(info[:width], info[:height])
-- 
GitLab