Ignore FFmpeg warnings in a nicer way.
[dcpomatic.git] / src / lib / ffmpeg_image_proxy.cc
index b54e29d4492c4e3ee1933777f72e5b9e1f932a48..f2b72059b9a013f59bad2c66e7ad56baa1dc207d 100644 (file)
@@ -86,7 +86,7 @@ avio_seek_wrapper (void* data, int64_t offset, int whence)
 int
 FFmpegImageProxy::avio_read (uint8_t* buffer, int const amount)
 {
-       int const to_do = min(int64_t(amount), _data.size() - _pos);
+       int const to_do = min(static_cast<int64_t>(amount), static_cast<int64_t>(_data.size()) - _pos);
        if (to_do == 0) {
                return AVERROR_EOF;
        }
@@ -115,6 +115,7 @@ FFmpegImageProxy::avio_seek (int64_t const pos, int whence)
        return _pos;
 }
 
+DCPOMATIC_DISABLE_WARNINGS
 
 ImageProxy::Result
 FFmpegImageProxy::image (optional<dcp::Size>) const
@@ -199,6 +200,8 @@ FFmpegImageProxy::image (optional<dcp::Size>) const
        return Result (_image, 0);
 }
 
+DCPOMATIC_ENABLE_WARNINGS
+
 void
 FFmpegImageProxy::add_metadata (xmlpp::Node* node) const
 {