recording: Skip EDL area if it is nil

The recording processing would crash if an area was present in the
layout, but was missing in the EDL entry being processed.

This doesn't happen in normal conditions, since most of the methods for
generating an EDL will result in areas being present, even if there are
no videos for that area.

But the EDL cleanup recently added can sometimes cause an EDL entry with
no areas to be processed, so add the code to handle this possibility.
This commit is contained in:
Calvin Walton 2023-02-21 15:28:24 -05:00
parent 54e128f0d3
commit dc9126b67b

View File

@ -430,6 +430,8 @@ module BigBlueButton
ffmpeg_filter = '[0]null'
layout[:areas].each do |layout_area|
area = cut[:areas][layout_area[:name]]
next if area.nil?
video_count = area.length
BigBlueButton.logger.debug " Laying out #{video_count} videos in #{layout_area[:name]}"
next if video_count == 0