Close assets on destruction even if finalize() is not called.
[libdcp.git] / src / stereo_picture_asset_writer.h
index 0a361e41f34d86976846d5b623c6bc461f21c221..287e7ecd786d87553ba76555a5a2e113b7986e4d 100644 (file)
@@ -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.