{
_size = boost::filesystem::file_size (file);
_data = new uint8_t[_size];
- FILE* f = dcp::fopen_boost (file, "r");
+ FILE* f = dcp::fopen_boost (file, "rb");
DCP_ASSERT (f);
fread (_data, 1, _size, f);
fclose (f);
{
boost::uintmax_t const size = boost::filesystem::file_size (path);
_buffer = new ASDCP::JP2K::FrameBuffer (size);
- FILE* f = fopen_boost (path, "r");
+ FILE* f = fopen_boost (path, "rb");
if (!f) {
boost::throw_exception (FileError ("could not open JPEG2000 file", path, errno));
}
SubtitleAsset::add_font_data (string id, boost::filesystem::path file)
{
boost::uintmax_t size = boost::filesystem::file_size (file);
- FILE* f = fopen_boost (file, "r");
+ FILE* f = fopen_boost (file, "rb");
if (!f) {
throw FileError ("could not open font file for reading", file, errno);
}
BOOST_REQUIRE_EQUAL (subs2->_fonts.size(), 1);
boost::uintmax_t const size = boost::filesystem::file_size ("test/data/dummy.ttf");
- FILE* f = dcp::fopen_boost ("test/data/dummy.ttf", "r");
+ FILE* f = dcp::fopen_boost ("test/data/dummy.ttf", "rb");
BOOST_REQUIRE (f);
shared_array<uint8_t> ref (new uint8_t[size]);
fread (ref.get(), 1, size, f);
BOOST_REQUIRE_EQUAL (subs2->_fonts.size(), 1);
boost::uintmax_t const size = boost::filesystem::file_size ("test/data/dummy.ttf");
- FILE* f = dcp::fopen_boost ("test/data/dummy.ttf", "r");
+ FILE* f = dcp::fopen_boost ("test/data/dummy.ttf", "rb");
BOOST_REQUIRE (f);
shared_array<uint8_t> ref (new uint8_t[size]);
fread (ref.get(), 1, size, f);
boost::filesystem::resize_file ("build/test/baz/video2.mxf", 16384 + 353 * 11);
{
- FILE* f = fopen ("build/test/baz/video2.mxf", "r+");
+ FILE* f = fopen ("build/test/baz/video2.mxf", "rb+");
rewind (f);
char zeros[256];
memset (zeros, 0, 256);