1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

oss: port to new channel layout API

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Anton Khirnov
2021-11-09 12:29:35 +01:00
committed by James Almer
parent 16970e1acb
commit 6964b59245
2 changed files with 2 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ static int audio_read_header(AVFormatContext *s1)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = s->codec_id;
st->codecpar->sample_rate = s->sample_rate;
st->codecpar->channels = s->channels;
st->codecpar->ch_layout.nb_channels = s->channels;
avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;

View File

@@ -43,7 +43,7 @@ static int audio_write_header(AVFormatContext *s1)
st = s1->streams[0];
s->sample_rate = st->codecpar->sample_rate;
s->channels = st->codecpar->channels;
s->channels = st->codecpar->ch_layout.nb_channels;
ret = ff_oss_audio_open(s1, 1, s1->url);
if (ret < 0) {
return AVERROR(EIO);