From 3f3f8fd4557c73c90c8c735909e4e04fcda112f0 Mon Sep 17 00:00:00 2001 From: sonvt-seta Date: Fri, 6 Jan 2023 17:37:50 +0700 Subject: [PATCH] Refactor code set key for caption --- src/main/java/com/wazeedigital/subtitle/FormatSCC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/wazeedigital/subtitle/FormatSCC.java b/src/main/java/com/wazeedigital/subtitle/FormatSCC.java index 80bec88..38e7926 100644 --- a/src/main/java/com/wazeedigital/subtitle/FormatSCC.java +++ b/src/main/java/com/wazeedigital/subtitle/FormatSCC.java @@ -191,7 +191,7 @@ else if (word == 0x0000) while (tto.captions.containsKey(key)) key++; // we save the caption - tto.captions.put(newCaption.start.mseconds, newCaption); + tto.captions.put(key, newCaption); // and reset the caption builder newCaption = new Caption(); } @@ -212,7 +212,7 @@ else if (word == 0x0000) while (tto.captions.containsKey(key)) key++; // we save the caption - tto.captions.put(newCaption.start.mseconds, newCaption); + tto.captions.put(key, newCaption); } } // End of caption: Swap off-screen buffer with caption screen.