diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:14:48 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:41:13 +0300 |
commit | 9465b109af0b70244a36f9e68493e316d9f8b56f (patch) | |
tree | c4d933bf09f8313071556063156538ec3356b24c /intern/ffmpeg/tests/ffmpeg_codecs.cc | |
parent | 026d21a225521670c6b5083da9da61227da69e65 (diff) | |
parent | ca1642cd0c5cdf634fe2022c955d93983de95934 (diff) |
Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-generic
Diffstat (limited to 'intern/ffmpeg/tests/ffmpeg_codecs.cc')
-rw-r--r-- | intern/ffmpeg/tests/ffmpeg_codecs.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/ffmpeg/tests/ffmpeg_codecs.cc b/intern/ffmpeg/tests/ffmpeg_codecs.cc index 10cbe4b938b..cd06917f59b 100644 --- a/intern/ffmpeg/tests/ffmpeg_codecs.cc +++ b/intern/ffmpeg/tests/ffmpeg_codecs.cc @@ -3,6 +3,8 @@ #include "testing/testing.h" extern "C" { +#include "ffmpeg_compat.h" + #include <libavcodec/avcodec.h> #include <libavutil/channel_layout.h> #include <libavutil/log.h> @@ -40,7 +42,11 @@ bool test_acodec(const AVCodec *codec, AVSampleFormat fmt) if (ctx) { ctx->sample_fmt = fmt; ctx->sample_rate = 48000; +#ifdef FFMPEG_USE_OLD_CHANNEL_VARS + ctx->channel_layout = AV_CH_LAYOUT_MONO; +#else av_channel_layout_from_mask(&ctx->ch_layout, AV_CH_LAYOUT_MONO); +#endif ctx->bit_rate = 128000; int open = avcodec_open2(ctx, codec, NULL); if (open >= 0) { |