mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-04 22:10:42 +09:00
Fix audio recording (channel layout) for ffmpeg 7
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user