summarylogtreecommitdiffstats
path: root/0001-fix-compile-with-openjp25.patch
diff options
context:
space:
mode:
authorBenjamin Radel2022-09-12 23:09:28 +0200
committerBenjamin Radel2022-09-12 23:09:28 +0200
commit57aaf1fb7d6bea782d44d75878dd2ae1f7beb5c1 (patch)
tree9853438d257e71927781e990fd3d83d570b0574f /0001-fix-compile-with-openjp25.patch
parent0beda4247029fa32d6b33feb9e8fd04311e9e590 (diff)
downloadaur-libdcp-git.tar.gz
Update Git Pkg for libdcp-git
Added Patch for openjpeg-2.5 compatibility
Diffstat (limited to '0001-fix-compile-with-openjp25.patch')
-rw-r--r--0001-fix-compile-with-openjp25.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/0001-fix-compile-with-openjp25.patch b/0001-fix-compile-with-openjp25.patch
new file mode 100644
index 000000000000..1cc8768962b3
--- /dev/null
+++ b/0001-fix-compile-with-openjp25.patch
@@ -0,0 +1,26 @@
+--- a/src/j2k_transcode.cc 2022-05-17 10:07:44.525679224 +0200
++++ b/src/j2k_transcode.cc 2022-05-17 10:04:18.846330309 +0200
+@@ -46,7 +46,7 @@
+ #include <openjpeg.h>
+ #include <cmath>
+ #include <iostream>
+-
++#include <string>
+
+ using std::min;
+ using std::pow;
+@@ -315,10 +315,13 @@
+ parameters.max_comp_size = parameters.max_cs_size / 1.25;
+ parameters.tcp_numlayers = 1;
+ parameters.tcp_mct = 1;
+- parameters.numgbits = fourk ? 2 : 1;
++ string numgbits = "GUARD_BITS=";
++ numgbits.append(std::to_string(fourk ? 2 : 1));
++ const char* extraopt[] { numgbits.data(), nullptr };
+
+ /* Setup the encoder parameters using the current image and user parameters */
+ opj_setup_encoder (encoder, &parameters, xyz->opj_image());
++ opj_encoder_set_extra_options(encoder, extraopt);
+
+ auto stream = opj_stream_default_create (OPJ_FALSE);
+ if (!stream) {