From 34f8cf30ba0242da01b9c1f50907c86ebe55fb1b Mon Sep 17 00:00:00 2001 From: Calvin Walton Date: Tue, 6 Feb 2024 16:13:39 -0500 Subject: [PATCH] recording: work around invalid locale in caption events This is a workaround for #19178 - but it does not fix the issue. The caption recording events with invalid empty `` are simply dropped with a warning message, to allow the recording and any valid caption streams present to be processed. --- record-and-playback/core/scripts/utils/gen_webvtt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/record-and-playback/core/scripts/utils/gen_webvtt b/record-and-playback/core/scripts/utils/gen_webvtt index d9ab086ffa..3e1237dd27 100755 --- a/record-and-playback/core/scripts/utils/gen_webvtt +++ b/record-and-playback/core/scripts/utils/gen_webvtt @@ -383,6 +383,11 @@ def parse_events(directory="."): have_record_events = True elif name == "EditCaptionHistoryEvent": parse_caption_edit(event, element) + if event["locale"] is None: + logger.warn( + "Skipping invalid caption event with unset locale. See https://github.com/bigbluebutton/bigbluebutton/issues/19178 for details" + ) + continue else: logger.debug("Unhandled event: %s", name) continue