summaryrefslogtreecommitdiff
path: root/src/sound_asset_reader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-17 14:30:21 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-17 14:30:21 +0100
commit34f2b95c1638a2cfedf21de5a203d6c0b77abf11 (patch)
treebd78b7dbca7d975a89ef9628f6d4b2fd783a39f1 /src/sound_asset_reader.cc
parent81ed0ebb725a7b5fec00ae209ba8b0d70ebc4ee1 (diff)
Use an optional<> where there should be one.
Diffstat (limited to 'src/sound_asset_reader.cc')
-rw-r--r--src/sound_asset_reader.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sound_asset_reader.cc b/src/sound_asset_reader.cc
index b656abd5..78c0abe1 100644
--- a/src/sound_asset_reader.cc
+++ b/src/sound_asset_reader.cc
@@ -35,6 +35,7 @@
#include "sound_asset.h"
#include "sound_frame.h"
#include "exceptions.h"
+#include "dcp_assert.h"
#include <asdcp/AS_DCP.h>
using boost::shared_ptr;
@@ -44,10 +45,11 @@ SoundAssetReader::SoundAssetReader (SoundAsset const * asset)
: AssetReader (asset)
{
_reader = new ASDCP::PCM::MXFReader ();
- Kumu::Result_t const r = _reader->OpenRead (asset->file().string().c_str());
+ DCP_ASSERT (asset->file ());
+ Kumu::Result_t const r = _reader->OpenRead (asset->file()->string().c_str());
if (ASDCP_FAILURE (r)) {
delete _reader;
- boost::throw_exception (FileError ("could not open MXF file for reading", asset->file(), r));
+ boost::throw_exception (FileError ("could not open MXF file for reading", asset->file().get(), r));
}
}