Skip to content
Snippets Groups Projects
Commit 52fadaf4 authored by Calvin Walton's avatar Calvin Walton
Browse files

Add a check to reject undecodable video streams.

In some cases, ffmpeg will be able to read the file, but the video itself
can't be decoded (missing/corrupt stream headers, for example). In this case,
some of the properties on the stream object will be nil.
Make sure that pix_fmt is present in the probed info, since that's a required
property.
parent 04d31d30
No related branches found
No related tags found
No related merge requests found
......@@ -287,6 +287,9 @@ module BigBlueButton
info[:width] = info[:video][:width].to_i
info[:height] = info[:video][:height].to_i
# Check for corrupt/undecodable video streams
return {} if info[:video][:pix_fmt].nil?
return {} if info[:width] == 0 or info[:height] == 0
info[:sample_aspect_ratio] = Rational(1, 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment