rm: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
release/5.1
Vittorio Giovara 8 years ago committed by James Almer
parent fcf5aad1a5
commit 82f728828e
  1. 5
      libavformat/rmdec.c
  2. 2
      libavformat/rmenc.c

@ -148,8 +148,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if (bytes_per_minute)
st->codecpar->bit_rate = 8LL * bytes_per_minute / 60;
st->codecpar->sample_rate = 8000;
st->codecpar->channels = 1;
st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_RA_144;
ast->deint_id = DEINT_ID_INT0;
@ -185,7 +184,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
}
st->codecpar->sample_rate = avio_rb16(pb);
avio_rb32(pb);
st->codecpar->channels = avio_rb16(pb);
st->codecpar->ch_layout.nb_channels = avio_rb16(pb);
if (version == 5) {
ast->deint_id = avio_rl32(pb);
avio_read(pb, buf, 4);

@ -228,7 +228,7 @@ static int rv10_write_header(AVFormatContext *ctx,
avio_wb32(s, 0); /* unknown */
avio_wb16(s, stream->par->sample_rate); /* sample rate */
avio_wb32(s, 0x10); /* unknown */
avio_wb16(s, stream->par->channels);
avio_wb16(s, stream->par->ch_layout.nb_channels);
put_str8(s, "Int0"); /* codec name */
if (stream->par->codec_tag) {
avio_w8(s, 4); /* tag length */

Loading…
Cancel
Save