summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_amr.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 18:25:12 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:36 -0300
commit620d151e5cb095c3406a06a476d4b0bfaf7f0182 (patch)
tree00dd1eca8d72cf227247ec0ca6a071c7157f3505 /libavformat/rtpdec_amr.c
parentb76e878f5b64587afa584e16ed8353c26d9cf10f (diff)
rtp: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_amr.c')
-rw-r--r--libavformat/rtpdec_amr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
index 988b7bddfd..ca4f0ff03a 100644
--- a/libavformat/rtpdec_amr.c
+++ b/libavformat/rtpdec_amr.c
@@ -64,11 +64,11 @@ static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return AVERROR_INVALIDDATA;
}
- if (st->codecpar->channels != 1) {
+ if (st->codecpar->ch_layout.nb_channels != 1) {
av_log(ctx, AV_LOG_ERROR, "Only mono AMR is supported\n");
return AVERROR_INVALIDDATA;
}
- st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+ av_channel_layout_default(&st->codecpar->ch_layout, 1);
/* The AMR RTP packet consists of one header byte, followed
* by one TOC byte for each AMR frame in the packet, followed