summaryrefslogtreecommitdiff
path: root/src/lib/text_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-03-04 00:41:01 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-04 00:43:28 +0100
commit17f8f22b07bd32d57edada0acde6fd9fffe3baf3 (patch)
treee72a5dfd79b3040c38e33180226aba05f46a36f0 /src/lib/text_decoder.cc
parent34bfe29024dd7926db8289781fa70c5e408263e5 (diff)
More correctly calculate bitmap subtitle scaling (#2670).2670-again
This was partially fixed before in 6ac468554c7fea0dfaefde85fb6cdd0fceaf5cad The last try accounted for cropping, but not for cases where the source video (after crop) does not precisely fit the DCP container. In those cases the x scale for the subtitles could be different to the y scale, squashing or stretching them.
Diffstat (limited to 'src/lib/text_decoder.cc')
-rw-r--r--src/lib/text_decoder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc
index 75fa33605..894145c35 100644
--- a/src/lib/text_decoder.cc
+++ b/src/lib/text_decoder.cc
@@ -352,9 +352,9 @@ TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const& subtitle
* of the video frame)
*/
void
-TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<const Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap(ContentTimePeriod period, dcp::Size parent_size, shared_ptr<const Image> image, dcpomatic::Rect<double> rect)
{
- emit_bitmap_start ({ period.from, image, rect });
+ emit_bitmap_start ({ period.from, parent_size, image, rect });
emit_stop (period.to);
}