diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2022-02-22 19:30:52 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2022-02-22 19:30:52 +0300 |
commit | 283a4cd40e6d07a55027298d693d9fba9a8a6f30 (patch) | |
tree | 6daf34f047339cba68149b2e496147c924518d08 /intern/ffmpeg/tests | |
parent | 353fe610ed2d31bda2da93f59a174fe1642d96ad (diff) |
Fix ffmpeg tests when using ffmpeg 5.0
Diffstat (limited to 'intern/ffmpeg/tests')
-rw-r--r-- | intern/ffmpeg/tests/ffmpeg_codecs.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/intern/ffmpeg/tests/ffmpeg_codecs.cc b/intern/ffmpeg/tests/ffmpeg_codecs.cc index 9538bac84d2..157731bf1f2 100644 --- a/intern/ffmpeg/tests/ffmpeg_codecs.cc +++ b/intern/ffmpeg/tests/ffmpeg_codecs.cc @@ -2,12 +2,13 @@ extern "C" { #include <libavcodec/avcodec.h> +#include <libavutil/channel_layout.h> #include <libavutil/log.h> } namespace { -bool test_vcodec(AVCodec *codec, AVPixelFormat pixelformat) +bool test_vcodec(const AVCodec *codec, AVPixelFormat pixelformat) { av_log_set_level(AV_LOG_QUIET); bool result = false; @@ -28,7 +29,7 @@ bool test_vcodec(AVCodec *codec, AVPixelFormat pixelformat) } return result; } -bool test_acodec(AVCodec *codec, AVSampleFormat fmt) +bool test_acodec(const AVCodec *codec, AVSampleFormat fmt) { av_log_set_level(AV_LOG_QUIET); bool result = false; @@ -52,7 +53,7 @@ bool test_acodec(AVCodec *codec, AVSampleFormat fmt) bool test_codec_video_by_codecid(AVCodecID codec_id, AVPixelFormat pixelformat) { bool result = false; - AVCodec *codec = avcodec_find_encoder(codec_id); + const AVCodec *codec = avcodec_find_encoder(codec_id); if (codec) result = test_vcodec(codec, pixelformat); return result; @@ -61,7 +62,7 @@ bool test_codec_video_by_codecid(AVCodecID codec_id, AVPixelFormat pixelformat) bool test_codec_video_by_name(const char *codecname, AVPixelFormat pixelformat) { bool result = false; - AVCodec *codec = avcodec_find_encoder_by_name(codecname); + const AVCodec *codec = avcodec_find_encoder_by_name(codecname); if (codec) result = test_vcodec(codec, pixelformat); return result; @@ -70,7 +71,7 @@ bool test_codec_video_by_name(const char *codecname, AVPixelFormat pixelformat) bool test_codec_audio_by_codecid(AVCodecID codec_id, AVSampleFormat fmt) { bool result = false; - AVCodec *codec = avcodec_find_encoder(codec_id); + const AVCodec *codec = avcodec_find_encoder(codec_id); if (codec) result = test_acodec(codec, fmt); return result; @@ -79,7 +80,7 @@ bool test_codec_audio_by_codecid(AVCodecID codec_id, AVSampleFormat fmt) bool test_codec_audio_by_name(const char *codecname, AVSampleFormat fmt) { bool result = false; - AVCodec *codec = avcodec_find_encoder_by_name(codecname); + const AVCodec *codec = avcodec_find_encoder_by_name(codecname); if (codec) result = test_acodec(codec, fmt); return result; |