Merge branch '1.0' of git.carlh.net:git/libdcp into 1.0
authorCarl Hetherington <cth@carlh.net>
Tue, 14 Feb 2017 17:02:57 +0000 (17:02 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 14 Feb 2017 17:02:57 +0000 (17:02 +0000)
cscript
src/dcp.cc
src/j2k.cc

diff --git a/cscript b/cscript
index 2f5f6f76bb2c13f99aa53ae8a21eabaabdde8858..9be355e65016e7be0d5aeb49b444d022d841186f 100644 (file)
--- a/cscript
+++ b/cscript
@@ -37,7 +37,7 @@ def dependencies(target):
     if target.platform == 'windows' and target.version == 'xp':
         return (('libcxml', 'v0.15.4'), ('openjpeg-cdist',  '5d8bffd'), ('asdcplib-cth', 'v0.1.3'))
     else:
-        return (('libcxml', 'v0.15.4'), ('openjpeg2-cdist', '94bdab1'), ('asdcplib-cth', 'v0.1.3'))
+        return (('libcxml', 'v0.15.4'), ('openjpeg2-cdist', '8ea62cc'), ('asdcplib-cth', 'v0.1.3'))
 
 def build(target, options):
     cmd = './waf configure --disable-examples --prefix=%s' % target.directory
index 884e3cb5944f1f63786e9cd55d68cd0ee03543a9..b633c4998b68ec135889cb0a88e3862be3a00a35 100644 (file)
@@ -224,7 +224,7 @@ DCP::read (bool keep_going, ReadErrors* errors, bool ignore_incorrect_picture_mx
                                        other_assets.push_back (shared_ptr<SMPTESubtitleAsset> (new SMPTESubtitleAsset (path)));
                                        break;
                                default:
-                                       throw DCPReadError ("Unknown MXF essence type");
+                                       throw DCPReadError (String::compose ("Unknown MXF essence type %1 in %2", int(type), path.string()));
                        }
                } else if (boost::filesystem::extension (path) == ".ttf") {
                        other_assets.push_back (shared_ptr<FontAsset> (new FontAsset (i->first, path)));
index 15f360c581a549777dab5687c67a2c454bed9a70..4a154574db331840dfb8b89986249ae1475c5f9c 100644 (file)
@@ -301,7 +301,12 @@ dcp::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frame
        opj_stream_set_user_data (stream, buffer, write_free_function);
 
        if (!opj_start_compress (encoder, xyz->opj_image(), stream)) {
-               throw MiscError ("could not start JPEG2000 encoding");
+               if ((errno & 0x61500) == 0x61500) {
+                       /* We've had one of the magic error codes from our patched openjpeg */
+                       throw MiscError (String::compose ("could not start JPEG2000 encoding (%1)", errno & 0xff));
+               } else {
+                       throw MiscError ("could not start JPEG2000 encoding");
+               }
        }
 
        if (!opj_encode (encoder, stream)) {