From c97b584731299a6a72db60574f1626ff07ddb76b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 15 Jul 2022 10:57:02 +0200 Subject: Fix thinko in previous commit. --- src/mono_picture_asset_writer.cc | 3 +-- src/sound_asset_writer.cc | 3 +-- src/stereo_picture_asset_writer.cc | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mono_picture_asset_writer.cc b/src/mono_picture_asset_writer.cc index b2b829fa..dd29c19a 100644 --- a/src/mono_picture_asset_writer.cc +++ b/src/mono_picture_asset_writer.cc @@ -78,7 +78,7 @@ MonoPictureAssetWriter::~MonoPictureAssetWriter() { try { /* Last-resort finalization to close the file, at least */ - if (_started) { + if (!_finalized) { _state->mxf_writer.Finalize(); } } catch (...) {} @@ -142,7 +142,6 @@ MonoPictureAssetWriter::finalize () if (ASDCP_FAILURE(r)) { boost::throw_exception (MXFFileError("error in finalizing video MXF", _file.string(), r)); } - _started = false; } _picture_asset->_intrinsic_duration = _frames_written; diff --git a/src/sound_asset_writer.cc b/src/sound_asset_writer.cc index 40acf924..ff14407d 100644 --- a/src/sound_asset_writer.cc +++ b/src/sound_asset_writer.cc @@ -115,7 +115,7 @@ SoundAssetWriter::~SoundAssetWriter() { try { /* Last-resort finalization to close the file, at least */ - if (_started) { + if (!_finalized) { _state->mxf_writer.Finalize(); } } catch (...) {} @@ -276,7 +276,6 @@ SoundAssetWriter::finalize () if (ASDCP_FAILURE(r)) { boost::throw_exception (MiscError(String::compose ("could not finalise audio MXF (%1)", static_cast(r)))); } - _started = false; } _asset->_intrinsic_duration = _frames_written; diff --git a/src/stereo_picture_asset_writer.cc b/src/stereo_picture_asset_writer.cc index f4ec7df0..b9120cd9 100644 --- a/src/stereo_picture_asset_writer.cc +++ b/src/stereo_picture_asset_writer.cc @@ -72,7 +72,7 @@ StereoPictureAssetWriter::~StereoPictureAssetWriter() { try { /* Last-resort finalization to close the file, at least */ - if (_started) { + if (!_finalized) { _state->mxf_writer.Finalize(); } } catch (...) {} @@ -151,7 +151,6 @@ StereoPictureAssetWriter::finalize () if (ASDCP_FAILURE(r)) { boost::throw_exception (MXFFileError("error in finalizing video MXF", _file.string(), r)); } - _started = false; } _picture_asset->_intrinsic_duration = _frames_written; -- cgit v1.2.3