noophq / subtitle

Convert subtitles from one format to another format. Supported formats: STL EBU, TTML SMI, VTT, SRT
GNU Lesser General Public License v3.0
100 stars 40 forks source link

Fix invalid bit shift when reading cct. #11

Closed sebcreme closed 2 years ago

sebcreme commented 5 years ago

There was an error when reading cct field. Found while reading arabic subtitles.

clebeaupin commented 5 years ago

Could you provide a unit test with an arabic subtitle?

sebcreme commented 5 years ago

Yes, here is an arabic test and arabic stl file.

clebeaupin commented 5 years ago

Test with the arabic file are failing. TTIs are correctly extracted but cues are empty

testCueRegion(fr.noop.subtitle.stl.ArabicStlParserTest) Time elapsed: 0.002 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at fr.noop.subtitle.stl.ArabicStlParserTest.setUp(ArabicStlParserTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)