|
@@ -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];
|