diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 18:10:23 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:36 -0300 |
commit | 67fb6c2200e1b4e15cd4e3b14f7240e4f152b5b0 (patch) | |
tree | 317a98ac35c29961b522a7c0c21e30cee1c444f7 | |
parent | 0b07a53170a71091586a625d351af655bd68c015 (diff) | |
download | ffmpeg-67fb6c2200e1b4e15cd4e3b14f7240e4f152b5b0.tar.gz |
psxstr: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/psxstr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c index e649ba3ab4..bb56b05688 100644 --- a/libavformat/psxstr.c +++ b/libavformat/psxstr.c @@ -252,18 +252,12 @@ static int str_read_packet(AVFormatContext *s, st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_ADPCM_XA; st->codecpar->codec_tag = 0; /* no fourcc */ - if (fmt & 1) { - st->codecpar->channels = 2; - st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; - } else { - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; - } + av_channel_layout_default(&st->codecpar->ch_layout, (fmt & 1) + 1); st->codecpar->sample_rate = (fmt&4)?18900:37800; // st->codecpar->bit_rate = 0; //FIXME; st->codecpar->block_align = 128; - avpriv_set_pts_info(st, 64, 18 * 224 / st->codecpar->channels, + avpriv_set_pts_info(st, 64, 18 * 224 / st->codecpar->ch_layout.nb_channels, st->codecpar->sample_rate); st->start_time = 0; } |