X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=b08b9caf18a0d7f3f7166f959662c0dd16fbffc9;hb=db468a15e50c8491d4b8462ad0676be905f49065;hp=6ca56ec4e743e7c175111e778c3916e4ff98b5ac;hpb=0a7004ab20d6bc3d20c1956df355384fa7f2da30;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 6ca56ec4e..b08b9caf1 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -28,6 +28,7 @@ #include "format.h" #include "log.h" #include "dcp_video_frame.h" +#include "playlist.h" #include "i18n.h" @@ -83,7 +84,7 @@ Writer::Writer (shared_ptr f) N_("audio.mxf"), _film->dcp_frame_rate (), m.dcp_channels (), - dcp_audio_sample_rate (_film->audio_stream()->sample_rate()) + dcp_audio_sample_rate (_film->audio_frame_rate()) ) ); @@ -275,9 +276,11 @@ Writer::finish () to /= N_("video.mxf"); boost::system::error_code ec; - if (boost::filesystem::create_hard_link (from, to, ec)) { + boost::filesystem::create_hard_link (from, to, ec); + if (ec) { /* hard link failed; copy instead */ boost::filesystem::copy_file (from, to); + _film->log()->log ("Hard-link failed; fell back to copying"); } /* And update the asset */