diff options
Diffstat (limited to 'cast/standalone_receiver/decoder.cc')
-rw-r--r-- | cast/standalone_receiver/decoder.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cast/standalone_receiver/decoder.cc b/cast/standalone_receiver/decoder.cc index 9a2324e3..92cdc901 100644 --- a/cast/standalone_receiver/decoder.cc +++ b/cast/standalone_receiver/decoder.cc @@ -4,6 +4,8 @@ #include "cast/standalone_receiver/decoder.h" +#include <libavcodec/version.h> + #include <algorithm> #include <sstream> #include <thread> @@ -44,7 +46,14 @@ absl::Span<uint8_t> Decoder::Buffer::GetSpan() { Decoder::Client::Client() = default; Decoder::Client::~Client() = default; -Decoder::Decoder(const std::string& codec_name) : codec_name_(codec_name) {} +Decoder::Decoder(const std::string& codec_name) : codec_name_(codec_name) { +#if LIBAVCODEC_VERSION_MAJOR < 59 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + avcodec_register_all(); +#pragma GCC diagnostic pop +#endif // LIBAVCODEC_VERSION_MAJOR < 59 +} Decoder::~Decoder() = default; |