diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-13 11:11:26 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:30 -0300 |
commit | 3cd1ad5c9e205e352a4ff526050927c5ce87d092 (patch) | |
tree | 822de0e528cb0e3c634ee6232210451244458535 /libavformat | |
parent | 8d814934f977be2dbbf83dc630861559b6f53411 (diff) |
avr: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/avr.c b/libavformat/avr.c index 6fdcf68952..1cc4d56bfb 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -53,9 +53,9 @@ static int avr_read_header(AVFormatContext *s) chan = avio_rb16(s->pb); if (!chan) { - st->codecpar->channels = 1; + st->codecpar->ch_layout.nb_channels = 1; } else if (chan == 0xFFFFu) { - st->codecpar->channels = 2; + st->codecpar->ch_layout.nb_channels = 2; } else { avpriv_request_sample(s, "chan %d", chan); return AVERROR_PATCHWELCOME; @@ -81,7 +81,7 @@ static int avr_read_header(AVFormatContext *s) return AVERROR_PATCHWELCOME; } - st->codecpar->block_align = bps * st->codecpar->channels / 8; + st->codecpar->block_align = bps * st->codecpar->ch_layout.nb_channels / 8; avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); return 0; |