Original commit message from CVS: * gst/subparse/samiparse.c: (handle_start_sync), (end_sami_element), (characters_sami): Remove trailing, leading and double whitespaces. Correctly timestamp buffers and output the last buffer too. * tests/check/elements/subparse.c: (GST_START_TEST), (subparse_suite): Add a simple unit test for SAMI parsing.