diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-08 13:12:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-08 13:12:58 +0100 |
| commit | b9dc0fbc6252e2c73dd2376b43d1a64b263aba43 (patch) | |
| tree | 88697f59642bf85b0febd4cd893066e98db462df /src | |
| parent | 4f064050310c70ec179b5de6ddb6f88ec824babf (diff) | |
Better error checking.
Diffstat (limited to 'src')
| -rw-r--r-- | src/smpte_subtitle_asset.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index eef28e51..87211cf2 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -177,16 +177,19 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const memcpy (descriptor.AssetID, writer_info.AssetUUID, ASDCP::UUIDlen); descriptor.ContainerDuration = latest_subtitle_out().as_editable_units (_edit_rate.numerator / _edit_rate.denominator); - /* XXX: fonts into descriptor? */ + /* XXX: should write fonts into the file somehow */ ASDCP::TimedText::MXFWriter writer; - Kumu::Result_t r = writer.OpenWrite (p.string().c_str(), writer_info, descriptor); + ASDCP::Result_t r = writer.OpenWrite (p.string().c_str(), writer_info, descriptor); if (ASDCP_FAILURE (r)) { boost::throw_exception (FileError ("could not open subtitle MXF for writing", p.string(), r)); } /* XXX: no encryption */ - writer.WriteTimedTextResource (xml_as_string ()); + r = writer.WriteTimedTextResource (xml_as_string ()); + if (ASDCP_FAILURE (r)) { + boost::throw_exception (MXFFileError ("could not write XML to timed text resource", p.string(), r)); + } writer.Finalize (); |
