diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-07-14 23:51:21 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-07-14 23:51:21 +0200 |
| commit | bdf7390c9ec8b24d6f007c4a53c191bb60c0fc75 (patch) | |
| tree | 55651e4561e69d61a251dc9ff6701b9e72093ade /src/stereo_picture_asset_writer.h | |
| parent | 860296bc2a6ffdb8dcf407a2a4ff985ccc30b87d (diff) | |
Close assets on destruction even if finalize() is not called.v1.8.23
Diffstat (limited to 'src/stereo_picture_asset_writer.h')
| -rw-r--r-- | src/stereo_picture_asset_writer.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stereo_picture_asset_writer.h b/src/stereo_picture_asset_writer.h index 0a361e41..287e7ecd 100644 --- a/src/stereo_picture_asset_writer.h +++ b/src/stereo_picture_asset_writer.h @@ -53,13 +53,15 @@ namespace dcp { * Objects of this class can only be created with StereoPictureAsset::start_write(). * * Frames can be written to the StereoPictureAsset by calling write() with a JPEG2000 image - * (a verbatim .j2c file). finalize() must be called after the last frame has been written. - * The action of finalize() can't be done in StereoPictureAssetWriter's destructor as it may - * throw an exception. + * (a verbatim .j2c file). finalize() should be called after the last frame has been written, + * but if it is not, it will be called by the destructor (though in that case any error + * during finalization will be ignored). */ class StereoPictureAssetWriter : public PictureAssetWriter { public: + ~StereoPictureAssetWriter(); + /** Write a frame for one eye. Frames must be written left, then right, then left etc. * @param data JPEG2000 data. * @param size Size of data. |
