hlsdemux2: subtitle ignored when *.vtt doesn't have "\n" on end of file
Describe your issue
subparse ignores last subtitle in file if *.vtt doesn't have "\n" on end of file
Setup
- Operating System: Ubuntu 20.04
- Device: Computer
- GStreamer Version: 1.23, 8650c7a4 (HEAD -> main)
- Command line: gst-play-1.0 http://localhost:8000/playlist.m3u8 --use-playbin3
Steps to reproduce the bug
see: https://github.com/stawel/gstreamer-tests/tree/main/vtt-subtitles/1024_BNC_Go/error_no_newline_on_end_of_file
[terminal 1]
git clone https://github.com/stawel/gstreamer-tests.git
cd gstreamer-tests/vtt-subtitles/1024_BNC_Go/error_no_newline_on_end_of_file
python3 -m http.server
[terminal 2]
gst-play-1.0 http://localhost:8000/playlist.m3u8 --use-playbin3
Expected subtitles
[TEST1] PURSUED AND THAT THE DEFENDANT\nGREGORY AND TRAVIS LIKE MICHAEL
[TEST2] GREGORY AND TRAVIS LIKE MICHAEL\nWERE REALLY THE AGGRESSORS AND
[TEST3] WERE REALLY THE AGGRESSORS AND\nTHAT WE UM BRIAN ALS
[TEST4] PART AND BECAUSE EACH OF THEM\nPL
[TEST5] ALTHOUGH TRAVIS MCMICHAEL FIRED\nTHE FATAL SHOTS HE SAID GEORGIA
[TEST6] THE FATAL SHOTS HE SAID GEORGIA\nLAW MAKES HIS CELL THAT IS AS
[TEST7 END] IF ALL THREE MEN HELD THE\nSHOTGUN THAT SHOT AND KILLED A
Observed subtitles
[TEST1] PURSUED AND THAT THE DEFENDANT\nGREGORY AND TRAVIS LIKE MICHAEL
[TEST2] GREGORY AND TRAVIS LIKE MICHAEL\nWERE REALLY THE AGGRESSORS AND
[TEST5] ALTHOUGH TRAVIS MCMICHAEL FIRED\nTHE FATAL SHOTS HE SAID GEORGIA
[TEST7 END] IF ALL THREE MEN HELD THE\nSHOTGUN THAT SHOT AND KILLED A
How reproducible is the bug?
Always
Additional Information
logs for:
GST_DEBUG=subparse:9 gst-play-1.0 http://localhost:8000/playlist.m3u8 --use-playbin3
subparse.log