Message ID | 20221106213326.5808-2-jamrial@gmail.com |
---|---|
State | Accepted |
Commit | 0d0d67ce3640f01395e6d3c1ab3fc2d68fe78e2e |
Headers | show |
Series | [FFmpeg-devel,1/2] avdevice/audiotoolbox: convert to new channel layout-API | expand |
Context | Check | Description |
---|---|---|
yinshiyou/configure_loongarch64 | warning | Failed to run configure |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index c9de93f774..36ad834753 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -706,8 +706,7 @@ static int get_audio_config(AVFormatContext *s) stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; stream->codecpar->sample_rate = basic_desc->mSampleRate; - stream->codecpar->channels = basic_desc->mChannelsPerFrame; - stream->codecpar->channel_layout = av_get_default_channel_layout(stream->codecpar->channels); + av_channel_layout_default(&stream->codecpar->ch_layout, basic_desc->mChannelsPerFrame); ctx->audio_channels = basic_desc->mChannelsPerFrame; ctx->audio_bits_per_sample = basic_desc->mBitsPerChannel;
Signed-off-by: James Almer <jamrial@gmail.com> --- Untested. libavdevice/avfoundation.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)