diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-06-22 03:36:23 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-06-22 03:36:23 +0200 |
commit | df83c8a602f6c928c13930b74c495edfd5037b33 (patch) | |
tree | 6eb9969d3498188e9f7fac22396eb8599c5cb516 /src/main.cpp | |
parent | 46da55b1eafef7495204a6733193057853d6575a (diff) |
Fix audio recording (channel layout) for ffmpeg 7
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 71980cf..b91e68c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2527,6 +2527,9 @@ int main(int argc, char **argv) { #if LIBAVUTIL_VERSION_MAJOR <= 56 av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_STEREO, 0); av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); + #elif LIBAVUTIL_VERSION_MAJOR >= 59 + av_opt_set_chlayout(swr, "in_chlayout", &audio_track.codec_context->ch_layout, 0); + av_opt_set_chlayout(swr, "out_chlayout", &audio_track.codec_context->ch_layout, 0); #else av_opt_set_chlayout(swr, "in_channel_layout", &audio_track.codec_context->ch_layout, 0); av_opt_set_chlayout(swr, "out_channel_layout", &audio_track.codec_context->ch_layout, 0); |