summaryrefslogtreecommitdiff
path: root/src/lib/subtitle_analysis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-24 17:46:01 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-24 17:46:01 +0200
commit3dc465914c2853923535ab630457874c11b1db3e (patch)
treeeae4541981e6b36171c215b2f97a0391d710fb1d /src/lib/subtitle_analysis.cc
parent61d004c90682fea31096a3645af56ae5080f13c3 (diff)
Fix typo and missing serialisation of offsets at time of analysis.
Diffstat (limited to 'src/lib/subtitle_analysis.cc')
-rw-r--r--src/lib/subtitle_analysis.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/subtitle_analysis.cc b/src/lib/subtitle_analysis.cc
index 91fec90b0..f8254f00d 100644
--- a/src/lib/subtitle_analysis.cc
+++ b/src/lib/subtitle_analysis.cc
@@ -50,6 +50,9 @@ SubtitleAnalysis::SubtitleAnalysis (boost::filesystem::path path)
_bounding_box->width = bounding_box->number_child<double>("Width");
_bounding_box->height = bounding_box->number_child<double>("Height");
}
+
+ _analysis_x_offset = f.number_child<double>("AnalysisXOffset");
+ _analysis_y_offset = f.number_child<double>("AnalysisYOffset");
}
@@ -69,6 +72,9 @@ SubtitleAnalysis::write (boost::filesystem::path path) const
bounding_box->add_child("Height")->add_child_text(raw_convert<string>(_bounding_box->height));
}
+ root->add_child("AnalysisXOffset")->add_child_text(raw_convert<string>(_analysis_x_offset));
+ root->add_child("AnalysisYOffset")->add_child_text(raw_convert<string>(_analysis_y_offset));
+
doc->write_to_file_formatted (path.string());
}