using std::cout;
using std::list;
using std::sort;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>)
throw FileError ("Could not open file for reading", path);
}
uint8_t* buffer = new uint8_t[size];
- fread (buffer, 1, size, f);
+ checked_fread (buffer, size, f, path);
fclose (f);
try {
_video_size = dcp::decompress_j2k (buffer, size, 0)->size ();
- } catch (dcp::DCPReadError& e) {
+ } catch (dcp::ReadError& e) {
delete[] buffer;
throw DecodeError (String::compose (_("Could not decode JPEG2000 file %1 (%2)"), path, e.what ()));
}
delete[] buffer;
} else {
- FFmpegImageProxy proxy(content->path(0));
- _video_size = proxy.image().first->size();
+ FFmpegImageProxy proxy(content->path(0), content->video->range());
+ _video_size = proxy.image().image->size();
}
if (content->still ()) {