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)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 8 Aug 2019 08:52:55 +0000 (09:52 +0100)
commitddd0aff31e162fbc3c01869d71a6498eb17c441a
treeed4e25cc583eef7b089290457c42fdea6d28a3ab
parente99c791d36cc624872e3782827e4d659887f73be
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