aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/segafilm.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-04-04 15:41:55 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:37 -0300
commit525ccbe8f13b1552df4bc9e172ec89101976b185 (patch)
tree74a0e35fab438c38689d4369ccd6935837c5b81a /libavformat/segafilm.c
parent81b3ebbae9b42425b524b8ea413845a09e99f578 (diff)
downloadffmpeg-525ccbe8f13b1552df4bc9e172ec89101976b185.tar.gz
segafilm: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r--libavformat/segafilm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 3af7518d03..4c6b68426c 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -177,20 +177,20 @@ static int film_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = film->audio_type;
st->codecpar->codec_tag = 1;
- st->codecpar->channels = film->audio_channels;
+ st->codecpar->ch_layout.nb_channels = film->audio_channels;
st->codecpar->sample_rate = film->audio_samplerate;
if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) {
st->codecpar->bits_per_coded_sample = 18 * 8 / 32;
- st->codecpar->block_align = st->codecpar->channels * 18;
+ st->codecpar->block_align = film->audio_channels * 18;
ffstream(st)->need_parsing = AVSTREAM_PARSE_FULL;
} else {
st->codecpar->bits_per_coded_sample = film->audio_bits;
- st->codecpar->block_align = st->codecpar->channels *
+ st->codecpar->block_align = film->audio_channels *
st->codecpar->bits_per_coded_sample / 8;
}
- st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *
+ st->codecpar->bit_rate = film->audio_channels * st->codecpar->sample_rate *
st->codecpar->bits_per_coded_sample;
}