subparse: fix pushing WebVTT cue when last is not an empty line
authorAntonio Ospite <antonio.ospite@collabora.com>
Mon, 6 May 2019 10:48:49 +0000 (12:48 +0200)
committerAntonio Ospite <antonio.ospite@collabora.com>
Mon, 6 May 2019 11:28:02 +0000 (13:28 +0200)
commit1c454fdafc54935f45ddcb9d758a634d152ff026
tree7a1a28399b0a94be5d583652d3b46b4a7fd12852
parentf4b054d349991dcce86fecd83a13e07c42732600
subparse: fix pushing WebVTT cue when last is not an empty line

If the last WebVTT cue does not have an empty line after it, or if it
does not end with a newline at all, it does not get pushed out and it
won't be displayed.

gst_sub_parse_sink_event() already handles the issue for other subtitle
formats, enable handling it for GST_SUB_PARSE_FORMAT_VTT too.

While at it also add a test for this case.
gst/subparse/gstsubparse.c
tests/check/elements/subparse.c