projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated es_ES translation from Manuel AC.
[dcpomatic.git]
/
src
/
lib
/
text_decoder.cc
diff --git
a/src/lib/text_decoder.cc
b/src/lib/text_decoder.cc
index 0a7bdf95da75ffc32f428d095929d8b891bb4b0d..99b68faba2b8ae570d7a60cc1cf28f4d67565923 100644
(file)
--- a/
src/lib/text_decoder.cc
+++ b/
src/lib/text_decoder.cc
@@
-36,7
+36,6
@@
using std::min;
using std::max;
using std::shared_ptr;
using boost::optional;
using std::max;
using std::shared_ptr;
using boost::optional;
-using std::function;
using namespace dcpomatic;
using namespace dcpomatic;
@@
-61,7
+60,7
@@
TextDecoder::TextDecoder (
* of the video frame)
*/
void
* of the video frame)
*/
void
-TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<
const
Image> image, dcpomatic::Rect<double> rect)
{
BitmapStart (ContentBitmapText (from, image, rect));
_position = from;
{
BitmapStart (ContentBitmapText (from, image, rect));
_position = from;
@@
-72,10
+71,11
@@
void
TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
{
for (auto& i: s) {
TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
{
for (auto& i: s) {
- /* We must escape
< and > in str
ings, otherwise they might confuse our subtitle
- renderer (which uses some HTML-esque markup to do bold/italic etc.)
+ /* We must escape
some th
ings, otherwise they might confuse our subtitle
+ renderer (which uses
entities and
some HTML-esque markup to do bold/italic etc.)
*/
string t = i.text ();
*/
string t = i.text ();
+ boost::algorithm::replace_all (t, "&", "&");
boost::algorithm::replace_all (t, "<", "<");
boost::algorithm::replace_all (t, ">", ">");
i.set_text (t);
boost::algorithm::replace_all (t, "<", "<");
boost::algorithm::replace_all (t, ">", ">");
i.set_text (t);
@@
-247,7
+247,8
@@
TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
use libsub for DCP subs) we can cheat by just putting 0 in here.
*/
dcp::Time (),
use libsub for DCP subs) we can cheat by just putting 0 in here.
*/
dcp::Time (),
- dcp::Time ()
+ dcp::Time (),
+ 0
)
);
}
)
);
}
@@
-285,7
+286,7
@@
TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s)
* of the video frame)
*/
void
* of the video frame)
*/
void
-TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<
const
Image> image, dcpomatic::Rect<double> rect)
{
emit_bitmap_start (period.from, image, rect);
emit_stop (period.to);
{
emit_bitmap_start (period.from, image, rect);
emit_stop (period.to);