summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-01 13:29:53 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-03 09:57:25 +0100
commit79ee0e5e79d8fb4a405d8b29827347d0243a17fe (patch)
treedb63ac4498164af59823a6070e96b2640ea4f502 /test
parent092c23dde5ad89e8dc8d31b83154b5ac58f5a7f2 (diff)
Don't emit subtitle images that have a zero dimension (#2743).
They cause problems later when trying to blend them into the image.
Diffstat (limited to 'test')
-rw-r--r--test/burnt_subtitle_test.cc22
m---------test/data0
2 files changed, 22 insertions, 0 deletions
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc
index 9c6863a1d..8d7dcd143 100644
--- a/test/burnt_subtitle_test.cc
+++ b/test/burnt_subtitle_test.cc
@@ -30,6 +30,7 @@
#include "lib/dcp_content.h"
#include "lib/dcp_content_type.h"
#include "lib/film.h"
+#include "lib/ffmpeg_encoder.h"
#include "lib/log_entry.h"
#include "lib/ratio.h"
#include "lib/text_content.h"
@@ -184,3 +185,24 @@ BOOST_AUTO_TEST_CASE(burnt_subtitle_test_position)
/* Should have a baseline 864 pixels from the top ((1 - 0.2) * 1080) */
check("bottom");
}
+
+
+/* Bug #2743 */
+BOOST_AUTO_TEST_CASE(burn_empty_subtitle_test)
+{
+ Cleanup cl;
+
+ auto content = content_factory("test/data/empty_sub.xml")[0];
+ auto film = new_test_film2("burnt_empty_subtitle_test", { content });
+ content->text[0]->set_use(true);
+
+ auto job = make_shared<TranscodeJob>(film, TranscodeJob::ChangedBehaviour::IGNORE);
+ auto file = boost::filesystem::path("build") / "test" / "burnt_empty_subtitle_test.mov";
+ cl.add(file);
+ FFmpegEncoder encoder(film, job, file, ExportFormat::PRORES_4444, false, false, false, 23);
+ encoder.go();
+
+ cl.run();
+}
+
+
diff --git a/test/data b/test/data
-Subproject a81d5737e54105f95d3d0cbf602dd355b881424
+Subproject 704f7643393caa29d77ddba138bff3642b273c4