X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=45a74624f7da19564766b26ef2eba18da8f59b84;hb=bd68f5a27795cb9151633bac810c53bae4ec4bf4;hp=da1a0768395b1963097cd85886c2b21cd210553f;hpb=c78d83c56bdec4935efd7a7d2f758165873d1137;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index da1a07683..45a74624f 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -23,6 +23,7 @@ #include "film.h" #include "ratio.h" #include "log.h" +#include "dcpomatic_log.h" #include "dcp_video.h" #include "dcp_content_type.h" #include "audio_mapping.h" @@ -44,14 +45,6 @@ #include "i18n.h" -#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); -#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, LogEntry::TYPE_GENERAL); -#define LOG_DEBUG_ENCODE(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_DEBUG_ENCODE); -#define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_TIMING); -#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, LogEntry::TYPE_WARNING); -#define LOG_WARNING(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_WARNING); -#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_ERROR); - /* OS X strikes again */ #undef set_key @@ -641,7 +634,7 @@ Writer::write_cover_sheet () boost::algorithm::replace_all (text, "$LENGTH", length); - fwrite (text.c_str(), 1, text.length(), f); + checked_fwrite (text.c_str(), text.length(), f, cover); fclose (f); } @@ -686,7 +679,6 @@ Writer::write (PlayerText text, TextType type, optional track, DCP DCPOMATIC_ASSERT (false); } - DCPOMATIC_ASSERT (*reel != _reels.end()); while ((*reel)->period().to <= period.from) { ++(*reel);