summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_image_proxy.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-07-27 21:47:26 +0200
committerCarl Hetherington <cth@carlh.net>2020-07-27 21:47:26 +0200
commit2da4caba7871455c097c0ed940dd6f2332dbda5d (patch)
treef87883d0fcfe4c19ae5f7490306d49cc4f5d02b3 /src/lib/ffmpeg_image_proxy.cc
parent94aadbd62c259a73d7511522dd167d519c68c5f9 (diff)
parent5d440e1133fc68dfffeaf53cf934b996dae811c7 (diff)
Merge branch 'warnings' into v2.15.x.
Clean up our handling of compiler warnings in a variety of ways, and use #pragma rather than -Wno to only disable warnings where necessary.
Diffstat (limited to 'src/lib/ffmpeg_image_proxy.cc')
-rw-r--r--src/lib/ffmpeg_image_proxy.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_image_proxy.cc b/src/lib/ffmpeg_image_proxy.cc
index db6059266..f2b72059b 100644
--- a/src/lib/ffmpeg_image_proxy.cc
+++ b/src/lib/ffmpeg_image_proxy.cc
@@ -25,12 +25,15 @@
#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
{