aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-11-06 18:29:50 -0300
committerJames Almer <jamrial@gmail.com>2022-11-08 14:08:05 -0300
commit0d0d67ce3640f01395e6d3c1ab3fc2d68fe78e2e (patch)
tree7715277ea6e2517a89e95ef58db83e4a41911443 /libavdevice
parentdf968fc1ffc4b8ee4c894f7cd8d7c20ef2bc3b58 (diff)
downloadffmpeg-0d0d67ce3640f01395e6d3c1ab3fc2d68fe78e2e.tar.gz
avdevice/avfoundation: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/avfoundation.m3
1 files changed, 1 insertions, 2 deletions
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;