+ -- If fading between two live inputs, the overlay is put on top.
+ -- If fading between the static picture and a live input,
+ -- the overlay is put on the live input.
+ local overlay = nil
+ if input0_live and not input1_live then
+ overlay = possibly_make_overlay(has_overlay, chain, input0.last)
+ if overlay then
+ input0.last = overlay.overlay_effect
+ end
+ elseif input1_live and not input0_live then
+ overlay = possibly_make_overlay(has_overlay, chain, input1.last)
+ if overlay then
+ input1.last = overlay.overlay_effect
+ end
+ end
+