diff --git a/av/src/AudioDecoder.cc b/av/src/AudioDecoder.cc index fbb63f8d..c7f51489 100644 --- a/av/src/AudioDecoder.cc +++ b/av/src/AudioDecoder.cc @@ -67,7 +67,13 @@ void AudioDecoder::Cleanup() { // Close the codec if (this->data->codecCtx) + { +#if LIBAVFORMAT_VERSION_MAJOR < 59 avcodec_close(this->data->codecCtx); +#else + avcodec_free_context(&this->data->codecCtx); +#endif + } // Close the audio file if (this->data->formatCtx) diff --git a/av/src/Video.cc b/av/src/Video.cc index 95d4cbdc..321d0b5b 100644 --- a/av/src/Video.cc +++ b/av/src/Video.cc @@ -83,7 +83,11 @@ void Video::Cleanup() avformat_close_input(&this->dataPtr->formatCtx); // Close the codec +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) + avcodec_free_context(&this->dataPtr->codecCtx); +#else avcodec_close(this->dataPtr->codecCtx); +#endif av_free(this->dataPtr->avFrameDst); } diff --git a/include/gz/common/EnumIface.hh b/include/gz/common/EnumIface.hh index b95ce1b3..0cb6d827 100644 --- a/include/gz/common/EnumIface.hh +++ b/include/gz/common/EnumIface.hh @@ -140,6 +140,10 @@ namespace ignition /// std::cout << "Type++ Name[" << myTypeIface.Str(*i) << "]\n"; /// } /// \verbatim +#if defined __APPLE__ && defined __clang__ + _Pragma("clang diagnostic push") + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#endif template class EnumIterator : std::iterator @@ -217,6 +221,9 @@ namespace ignition /// member value ever used. private: Enum c; }; +#if defined __APPLE__ && defined __clang__ + _Pragma("clang diagnostic pop") +#endif /// \brief Equality operator /// \param[in] _e1 First iterator