mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 09:12:33 +00:00
mmf: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
7baa1807b8
commit
847e6393ac
@ -80,7 +80,7 @@ static int mmf_write_header(AVFormatContext *s)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
mmf->stereo = s->streams[0]->codecpar->channels > 1;
|
||||
mmf->stereo = s->streams[0]->codecpar->ch_layout.nb_channels > 1;
|
||||
if (mmf->stereo &&
|
||||
s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
|
||||
av_log(s, AV_LOG_ERROR, "Yamaha SMAF stereo is experimental, "
|
||||
@ -261,8 +261,7 @@ static int mmf_read_header(AVFormatContext *s)
|
||||
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
st->codecpar->codec_id = AV_CODEC_ID_ADPCM_YAMAHA;
|
||||
st->codecpar->sample_rate = rate;
|
||||
st->codecpar->channels = (params >> 7) + 1;
|
||||
st->codecpar->channel_layout = params >> 7 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
av_channel_layout_default(&st->codecpar->ch_layout, (params >> 7) + 1);
|
||||
st->codecpar->bits_per_coded_sample = 4;
|
||||
st->codecpar->bit_rate = st->codecpar->sample_rate *
|
||||
st->codecpar->bits_per_coded_sample;
|
||||
|
Loading…
Reference in New Issue
Block a user