From 36fc3e9b05e20d81fa251f10b2f4f9cdadfb04c8 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 31 Mar 2017 18:53:19 +0200 Subject: [PATCH] wc3movie: convert to new channel layout API Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/wc3movie.c | 8 +++----- 1 file 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; }