We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got some errors while building the example with ffmpeg v7 (default version on ubuntu 24.10) Needed the following patch to have it compile:
diff --git a/examples/ffmpeg-transcode.cpp b/examples/ffmpeg-transcode.cpp index 20f390de..7c4ff283 100644 --- a/examples/ffmpeg-transcode.cpp +++ b/examples/ffmpeg-transcode.cpp @@ -248,11 +248,13 @@ static int decode_audio(struct audio_buffer *audio_buf, s16 **data, int *size) /* prepare resampler */ swr = swr_alloc(); - - av_opt_set_int(swr, "in_channel_count", codec->channels, 0); + AVChannelLayout out_chlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; + av_opt_set_int(swr, "in_channel_count", codec->ch_layout.nb_channels, 0); av_opt_set_int(swr, "out_channel_count", 1, 0); - av_opt_set_int(swr, "in_channel_layout", codec->channel_layout, 0); - av_opt_set_int(swr, "out_channel_layout", AV_CH_LAYOUT_MONO, 0); + av_opt_set_chlayout(swr, "in_chlayout", &codec->ch_layout, 0); + av_opt_set_chlayout(swr, "out_chlayout", &out_chlayout, 0); av_opt_set_int(swr, "in_sample_rate", codec->sample_rate, 0); av_opt_set_int(swr, "out_sample_rate", WAVE_SAMPLE_RATE, 0); av_opt_set_sample_fmt(swr, "in_sample_fmt", codec->sample_fmt, 0);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I got some errors while building the example with ffmpeg v7 (default version on ubuntu 24.10)
Needed the following patch to have it compile:
The text was updated successfully, but these errors were encountered: