diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-02-14 17:02:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-02-14 17:02:57 +0000 |
| commit | cab0005c7370a1101df604838ea214eb741098d7 (patch) | |
| tree | 2b2e1b3f5bc279017a613c0b32942a81b293a6a4 /src | |
| parent | 5dda5d997e389052b63f422776aa205434789751 (diff) | |
| parent | ce32d6cd30b916acc30d19241168ad4e41be6bda (diff) | |
Merge branch '1.0' of git.carlh.net:git/libdcp into 1.0
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 2 | ||||
| -rw-r--r-- | src/j2k.cc | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -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))); @@ -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)) { |
