diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 18:53:19 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:38 -0300 |
commit | 36fc3e9b05e20d81fa251f10b2f4f9cdadfb04c8 (patch) | |
tree | cdf7182fee34fd0d96a4afc27400f97099b9f049 /libavformat/wc3movie.c | |
parent | 95a3f13cfd22d64fe9561518518a3c334b8bbaf3 (diff) | |
download | ffmpeg-36fc3e9b05e20d81fa251f10b2f4f9cdadfb04c8.tar.gz |
wc3movie: 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/wc3movie.c')
-rw-r--r-- | libavformat/wc3movie.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c index fe2d0d4245..8f5c2f18cd 100644 --- a/libavformat/wc3movie.c +++ b/libavformat/wc3movie.c @@ -54,7 +54,6 @@ /* always use the same PCM audio parameters */ #define WC3_SAMPLE_RATE 22050 -#define WC3_AUDIO_CHANNELS 1 #define WC3_AUDIO_BITS 16 /* nice, constant framerate */ @@ -195,13 +194,12 @@ static int wc3_read_header(AVFormatContext *s) st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; st->codecpar->codec_tag = 1; - st->codecpar->channels = WC3_AUDIO_CHANNELS; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; st->codecpar->bits_per_coded_sample = WC3_AUDIO_BITS; st->codecpar->sample_rate = WC3_SAMPLE_RATE; - st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * + st->codecpar->bit_rate = st->codecpar->ch_layout.nb_channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; - st->codecpar->block_align = WC3_AUDIO_BITS * WC3_AUDIO_CHANNELS; + st->codecpar->block_align = WC3_AUDIO_BITS * st->codecpar->ch_layout.nb_channels; return 0; } |