diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 18:25:12 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:36 -0300 |
commit | 620d151e5cb095c3406a06a476d4b0bfaf7f0182 (patch) | |
tree | 00dd1eca8d72cf227247ec0ca6a071c7157f3505 /libavformat/rtpdec.c | |
parent | b76e878f5b64587afa584e16ed8353c26d9cf10f (diff) | |
download | ffmpeg-620d151e5cb095c3406a06a476d4b0bfaf7f0182.tar.gz |
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.c')
-rw-r--r-- | libavformat/rtpdec.c | 4 |
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 */ |