summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-14 16:22:54 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-14 16:22:54 +0100
commitb172ecbede672bdef982e5b45376ac3517440263 (patch)
treeca3330c6dfed482828b83be12588f06f4025f208
parent8526058d24faec5f83ffd66758fef8d8c8159f73 (diff)
Fix corpus tests wrt alphabetical sorting; fix some bugs with subtitles that were shown up.
-rwxr-xr-xrun-tests.sh4
-rw-r--r--src/parse/subtitle.cc2
-rw-r--r--src/subtitle_asset.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 888968ad..7ed965cf 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -29,7 +29,7 @@ if [ ! -e "../libdcp-test" ]; then
exit 1
fi
-for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d`; do
+for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d | sort`; do
if [ `basename $d` != ".git" ]; then
LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info.log
if [ "$?" != "0" ]; then
@@ -49,7 +49,7 @@ rm -f build/test/info2.log
rm -rf build/test/libdcp-test
cp -r ../libdcp-test build/test
-for d in `find build/test/libdcp-test -mindepth 1 -maxdepth 1 -type d`; do
+for d in `find build/test/libdcp-test -mindepth 1 -maxdepth 1 -type d | sort`; do
if [ `basename $d` != ".git" ]; then
LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/rewrite_subs $d
LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info2.log
diff --git a/src/parse/subtitle.cc b/src/parse/subtitle.cc
index 471d62b7..612af716 100644
--- a/src/parse/subtitle.cc
+++ b/src/parse/subtitle.cc
@@ -36,7 +36,7 @@ Font::Font (shared_ptr<const cxml::Node> node)
id = node->optional_string_attribute ("Id").get_value_or ("");
size = node->optional_number_attribute<int64_t> ("Size").get_value_or (0);
- italic = node->optional_bool_attribute ("Italic").get_value_or (false);
+ italic = node->optional_bool_attribute ("Italic");
optional<string> c = node->optional_string_attribute ("Color");
if (c) {
color = Color (c.get ());
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
index 5decc1e3..ca91e2c7 100644
--- a/src/subtitle_asset.cc
+++ b/src/subtitle_asset.cc
@@ -386,7 +386,7 @@ SubtitleAsset::write_xml (ostream& s) const
font->set_attribute ("Weight", "normal");
}
- if (!subtitle ||
+ if (!subtitle || font_changed ||
(last_in != (*i)->in() ||
last_out != (*i)->out() ||
last_fade_up_time != (*i)->fade_up_time() ||
@@ -412,6 +412,6 @@ SubtitleAsset::write_xml (ostream& s) const
text->add_child_text ((*i)->text());
}
- doc.write_to_stream_formatted (s);
+ doc.write_to_stream_formatted (s, "UTF-8");
}