ace: convert to new channel layout API

Signed-off-by: James Almer <jamrial@gmail.com>
release/5.1
James Almer 3 years ago
parent bca70e7912
commit ee9c142c2e
  1. 4
      libavformat/acedec.c

@ -74,7 +74,7 @@ static int ace_read_header(AVFormatContext *s)
st->start_time = 0;
par = st->codecpar;
par->codec_type = AVMEDIA_TYPE_AUDIO;
par->channels = nb_channels;
par->ch_layout.nb_channels = nb_channels;
par->sample_rate = rate;
par->block_align = (codec == 4 ? 0x60 : codec == 5 ? 0x98 : 0xC0) * nb_channels;
st->duration = (size / par->block_align) * 1024LL;
@ -85,7 +85,7 @@ static int ace_read_header(AVFormatContext *s)
return ret;
AV_WL16(st->codecpar->extradata, 1);
AV_WL16(st->codecpar->extradata+2, 2048 * par->channels);
AV_WL16(st->codecpar->extradata+2, 2048 * nb_channels);
AV_WL16(st->codecpar->extradata+4, 0);
AV_WL16(st->codecpar->extradata+6, codec == 4 ? 1 : 0);
AV_WL16(st->codecpar->extradata+8, codec == 4 ? 1 : 0);

Loading…
Cancel
Save