diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-11-09 12:29:35 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:34 -0300 |
commit | e271d534e3f5aa13cbbfe0c487661b5616765330 (patch) | |
tree | 8052a442b285b88327e74674c0edf685c8ba592b /libavdevice | |
parent | 678c1952a90570753eee842851e50d9c8a7b111e (diff) | |
download | ffmpeg-e271d534e3f5aa13cbbfe0c487661b5616765330.tar.gz |
libcdio: port to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/libcdio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c index 623878fe7f..4417523c57 100644 --- a/libavdevice/libcdio.c +++ b/libavdevice/libcdio.c @@ -90,13 +90,14 @@ static av_cold int read_header(AVFormatContext *ctx) else st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; st->codecpar->sample_rate = 44100; - st->codecpar->channels = 2; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; if (s->drive->audio_last_sector != CDIO_INVALID_LSN && s->drive->audio_first_sector != CDIO_INVALID_LSN) st->duration = s->drive->audio_last_sector - s->drive->audio_first_sector; else if (s->drive->tracks) st->duration = s->drive->disc_toc[s->drive->tracks].dwStartSector; - avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2 * st->codecpar->channels * st->codecpar->sample_rate); + avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, + 2 * st->codecpar->ch_layout.nb_channels * st->codecpar->sample_rate); for (i = 0; i < s->drive->tracks; i++) { char title[16]; |