Fix freeze YouTube al cambio punteggio: PNG atomica e relay stabile
rsvg scrive su .tmp poi rename; il feeder ignora PNG parziali. YouTube relay: no doppio avvio, reconnect RTMP; overlay restart solo dopo 3 miss. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,10 +37,12 @@ module Streams
|
||||
end
|
||||
|
||||
def render_png!(svg_path, png_path)
|
||||
unless system("rsvg-convert", "-w", "1280", "-h", "720", "-o", png_path.to_s, svg_path.to_s, out: File::NULL, err: File::NULL)
|
||||
tmp = "#{png_path}.tmp"
|
||||
unless system("rsvg-convert", "-w", "1280", "-h", "720", "-o", tmp, svg_path.to_s, out: File::NULL, err: File::NULL)
|
||||
raise Error, "rsvg-convert fallito per session #{@session.id}"
|
||||
end
|
||||
|
||||
File.rename(tmp, png_path)
|
||||
FileUtils.touch(png_path)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user