diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-16 00:51:07 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-16 00:51:07 +0100 |
| commit | 14848004f619d11bd6810735637d428f101e6b51 (patch) | |
| tree | e2aa460b25f98db37523c2ea92cc3997c3745336 /src/stereo_picture_asset_writer.cc | |
| parent | a6070a8af446620ab16ad172b94041601c95700d (diff) | |
Consider assets outside the DCP as referenced assets (i.e.1.0-vf
not to be written to the asset map). Return a value from
finalize() to say whether a writer has written anything.
Other small related tweaks.
Diffstat (limited to 'src/stereo_picture_asset_writer.cc')
| -rw-r--r-- | src/stereo_picture_asset_writer.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/stereo_picture_asset_writer.cc b/src/stereo_picture_asset_writer.cc index f17e3d2f..322c7b00 100644 --- a/src/stereo_picture_asset_writer.cc +++ b/src/stereo_picture_asset_writer.cc @@ -110,14 +110,16 @@ StereoPictureAssetWriter::fake_write (int size) } } -void +bool StereoPictureAssetWriter::finalize () { - Kumu::Result_t r = _state->mxf_writer.Finalize(); - if (ASDCP_FAILURE (r)) { - boost::throw_exception (MXFFileError ("error in finalizing video MXF", _file.string(), r)); + if (_started) { + Kumu::Result_t r = _state->mxf_writer.Finalize(); + if (ASDCP_FAILURE (r)) { + boost::throw_exception (MXFFileError ("error in finalizing video MXF", _file.string(), r)); + } } _picture_asset->_intrinsic_duration = _frames_written; - PictureAssetWriter::finalize (); + return PictureAssetWriter::finalize (); } |
