Skip to content

Commit

Permalink
sndio: convert to new channel layout API
Browse files Browse the repository at this point in the history
Signed-off-by: James Almer <[email protected]>
  • Loading branch information
jamrial committed Mar 15, 2022
1 parent 360fac0 commit 6f1a9ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libavdevice/sndio_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static av_cold 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 */

Expand Down
2 changes: 1 addition & 1 deletion libavdevice/sndio_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static av_cold 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_sndio_open(s1, 1, s1->url);

Expand Down

0 comments on commit 6f1a9ef

Please sign in to comment.