mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libcdio: port to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
678c1952a9
commit
e271d534e3
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user