summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index f285a41cf4..fa7544cc07 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -538,7 +538,7 @@ static int opus_write_extradata(AVCodecParameters *codecpar)
* This mapping family only supports mono and stereo layouts. And RFC7587
* specifies that the number of channels in the SDP must be 2.
*/
- if (codecpar->channels > 2) {
+ if (codecpar->ch_layout.nb_channels > 2) {
return AVERROR_INVALIDDATA;
}
@@ -553,7 +553,7 @@ static int opus_write_extradata(AVCodecParameters *codecpar)
/* Version */
bytestream_put_byte (&bs, 0x1);
/* Channel count */
- bytestream_put_byte (&bs, codecpar->channels);
+ bytestream_put_byte (&bs, codecpar->ch_layout.nb_channels);
/* Pre skip */
bytestream_put_le16 (&bs, 0);
/* Input sample rate */