Trying to create export audio encoders with between 9 and 15 channels
[dcpomatic.git] / src / lib / ffmpeg_image_proxy.cc
index db6059266dc472e13b8908a67f5baf0b2a800618..f2b72059b9a013f59bad2c66e7ad56baa1dc207d 100644 (file)
 #include "image.h"
 #include "compose.hpp"
 #include "util.h"
+#include "warnings.h"
 #include <dcp/raw_convert.h>
 extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 }
+DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
 #include <iostream>
 
 #include "i18n.h"
@@ -83,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;
        }
@@ -112,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
@@ -196,6 +200,8 @@ FFmpegImageProxy::image (optional<dcp::Size>) const
        return Result (_image, 0);
 }
 
+DCPOMATIC_ENABLE_WARNINGS
+
 void
 FFmpegImageProxy::add_metadata (xmlpp::Node* node) const
 {