summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-02 17:08:14 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-02 17:08:14 +0100
commiteb2304316b16ab5cfe29939242c22fad59987420 (patch)
tree700eba991357784fcc64e5acc9187f89b0f95bb9
parentc24798d1ab4bb75c8ee0c8b8663b11e599df1c25 (diff)
parent3d8c3bcf37328180bdeb71be3608614a64b91a5e (diff)
Merge branch '1.0' of git.carlh.net:git/libsub into 1.0
-rw-r--r--cscript2
-rw-r--r--src/subrip_reader.cc4
-rw-r--r--test/subrip_reader_test.cc1
3 files changed, 6 insertions, 1 deletions
diff --git a/cscript b/cscript
index 473cac2..98758f3 100644
--- a/cscript
+++ b/cscript
@@ -1,7 +1,7 @@
import os
def dependencies(target):
- return (('asdcplib-cth', 'v0.1.0'), ('libcxml', 'v0.15.1'))
+ return (('asdcplib-cth', 'v0.1.1'), ('libcxml', 'v0.15.1'))
def build(target, options):
cmd = './waf configure --prefix=%s' % target.directory
diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc
index f71843e..5a4122c 100644
--- a/src/subrip_reader.cc
+++ b/src/subrip_reader.cc
@@ -103,6 +103,10 @@ SubripReader::read (function<optional<string> ()> get_line)
case METADATA:
{
vector<string> p;
+
+ /* Further trim this line, removing spaces from the end */
+ trim_right_if (*line, boost::is_any_of (" "));
+
boost::algorithm::split (p, *line, boost::algorithm::is_any_of (" "));
if (p.size() != 3 && p.size() != 7) {
throw SubripError (*line, "a time/position line");
diff --git a/test/subrip_reader_test.cc b/test/subrip_reader_test.cc
index a20cc07..cb72e28 100644
--- a/test/subrip_reader_test.cc
+++ b/test/subrip_reader_test.cc
@@ -369,4 +369,5 @@ BOOST_AUTO_TEST_CASE (subrip_read_test)
test ("sintel_en.srt");
test ("sintel_fr.srt");
test ("Fight.Club.1999.720p.BRRip.x264-x0r.srt");
+ test ("EU13.srt");
}