summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_amr.c
diff options
context:
space:
mode:
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