File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,13 @@ void AudioDecoder::Cleanup()
6767{
6868 // Close the codec
6969 if (this ->data ->codecCtx )
70+ {
71+ #if LIBAVFORMAT_VERSION_MAJOR < 59
7072 avcodec_close (this ->data ->codecCtx );
73+ #else
74+ avcodec_free_context (&this ->data ->codecCtx );
75+ #endif
76+ }
7177
7278 // Close the audio file
7379 if (this ->data ->formatCtx )
Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ void Video::Cleanup()
8383 avformat_close_input (&this ->dataPtr ->formatCtx );
8484
8585 // Close the codec
86+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
87+ avcodec_free_context (&this ->dataPtr ->codecCtx );
88+ #else
8689 avcodec_close (this ->dataPtr ->codecCtx );
90+ #endif
8791
8892 av_free (this ->dataPtr ->avFrameDst );
8993}
Original file line number Diff line number Diff line change @@ -140,6 +140,10 @@ namespace ignition
140140 // / std::cout << "Type++ Name[" << myTypeIface.Str(*i) << "]\n";
141141 // / }
142142 // / \verbatim
143+ #if defined __APPLE__ && defined __clang__
144+ _Pragma (" clang diagnostic push" )
145+ _Pragma(" clang diagnostic ignored \" -Wdeprecated-declarations\" " )
146+ #endif
143147 template <typename Enum>
144148 class EnumIterator
145149 : std::iterator<std::bidirectional_iterator_tag, Enum>
@@ -217,6 +221,9 @@ namespace ignition
217221 // / member value ever used.
218222 private: Enum c;
219223 };
224+ #if defined __APPLE__ && defined __clang__
225+ _Pragma (" clang diagnostic pop" )
226+ #endif
220227
221228 // / \brief Equality operator
222229 // / \param[in] _e1 First iterator
You can’t perform that action at this time.
0 commit comments