aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-11-09 12:29:35 +0100
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:35 -0300
commit6964b59245836b60eeadfbfdac22a68644e590df (patch)
tree735a4ee03fd20c376ac5f4e12688b4bfbf2defde
parent16970e1acb1375b484ad8f226a8401e950df4f9a (diff)
downloadffmpeg-6964b59245836b60eeadfbfdac22a68644e590df.tar.gz
oss: port to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavdevice/oss_dec.c2
-rw-r--r--libavdevice/oss_enc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/oss_dec.c b/libavdevice/oss_dec.c
index 4f3772c1f5..d3dbe77cf9 100644
--- a/libavdevice/oss_dec.c
+++ b/libavdevice/oss_dec.c
@@ -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;
diff --git a/libavdevice/oss_enc.c b/libavdevice/oss_enc.c
index 3103d2de9a..d6a512a264 100644
--- a/libavdevice/oss_enc.c
+++ b/libavdevice/oss_enc.c
@@ -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);