sol: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Vittorio Giovara 2017-03-31 18:35:41 +02:00 committed by James Almer
parent 6f1a9effef
commit a6b5153df5
1 changed files with 1 additions and 3 deletions

View File

@ -113,9 +113,7 @@ static int sol_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_tag = id; st->codecpar->codec_tag = id;
st->codecpar->codec_id = codec; st->codecpar->codec_id = codec;
st->codecpar->channels = channels; av_channel_layout_default(&st->codecpar->ch_layout,channels);
st->codecpar->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
AV_CH_LAYOUT_STEREO;
st->codecpar->sample_rate = rate; st->codecpar->sample_rate = rate;
avpriv_set_pts_info(st, 64, 1, rate); avpriv_set_pts_info(st, 64, 1, rate);
return 0; return 0;