X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fencoded_data.cc;h=4f8aaab4b5b6f62199884eb76855140cc34e0441;hb=c4ea2ff06b31ccd20daadbdc968e397eb13a7e36;hp=61d2644daf324dd251861dbfe686ff93e514dc31;hpb=9e4c091e6ef0f79fab10664e95240de2f14e5702;p=dcpomatic.git diff --git a/src/lib/encoded_data.cc b/src/lib/encoded_data.cc index 61d2644da..4f8aaab4b 100644 --- a/src/lib/encoded_data.cc +++ b/src/lib/encoded_data.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include "cross.h" #include "exceptions.h" #include "film.h" +#include "dcpomatic_socket.h" #include "i18n.h" @@ -90,12 +91,14 @@ EncodedData::write (shared_ptr film, int frame, Eyes eyes) const } void -EncodedData::write_info (shared_ptr film, int frame, Eyes eyes, dcp::FrameInfo fin) const +EncodedData::write_info (shared_ptr film, int frame, Eyes eyes, dcp::FrameInfo info) const { - boost::filesystem::path const info = film->info_path (frame, eyes); - FILE* h = fopen_boost (info, "w"); - fin.write (h); - fclose (h); + FILE* file = fopen_boost (film->info_file(), "ab"); + if (!file) { + throw OpenFileError (film->info_file ()); + } + write_frame_info (file, frame, eyes, info); + fclose (file); } /** Send this data to a socket.