diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 14:18:36 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:33 -0300 |
commit | 59530185c9f5b030fadd204a71268ae3255e5740 (patch) | |
tree | ee1cab2e648d12e4ebe84bba598d8b8cf0ca6d8c /libavformat/idroqdec.c | |
parent | f9d235f9a2f5eb409a3985a60c7a36d195d8d896 (diff) | |
download | ffmpeg-59530185c9f5b030fadd204a71268ae3255e5740.tar.gz |
idroq: 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/idroqdec.c')
-rw-r--r-- | libavformat/idroqdec.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c index 0c8b7278e9..c9fc972780 100644 --- a/libavformat/idroqdec.c +++ b/libavformat/idroqdec.c @@ -185,18 +185,16 @@ static int roq_read_packet(AVFormatContext *s, st->codecpar->codec_id = AV_CODEC_ID_ROQ_DPCM; st->codecpar->codec_tag = 0; /* no tag */ if (chunk_type == RoQ_SOUND_STEREO) { - st->codecpar->channels = 2; - st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; } else { - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; } - roq->audio_channels = st->codecpar->channels; + roq->audio_channels = st->codecpar->ch_layout.nb_channels; st->codecpar->sample_rate = RoQ_AUDIO_SAMPLE_RATE; st->codecpar->bits_per_coded_sample = 16; - st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * + st->codecpar->bit_rate = roq->audio_channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; - st->codecpar->block_align = st->codecpar->channels * st->codecpar->bits_per_coded_sample; + st->codecpar->block_align = roq->audio_channels * st->codecpar->bits_per_coded_sample; } case RoQ_QUAD_VQ: if (chunk_type == RoQ_QUAD_VQ) { |