Commit 3cd1ad5c authored by Anton Khirnov's avatar Anton Khirnov Committed by James Almer

avr: convert to new channel layout API

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 8d814934
...@@ -53,9 +53,9 @@ static int avr_read_header(AVFormatContext *s) ...@@ -53,9 +53,9 @@ static int avr_read_header(AVFormatContext *s)
chan = avio_rb16(s->pb); chan = avio_rb16(s->pb);
if (!chan) { if (!chan) {
st->codecpar->channels = 1; st->codecpar->ch_layout.nb_channels = 1;
} else if (chan == 0xFFFFu) { } else if (chan == 0xFFFFu) {
st->codecpar->channels = 2; st->codecpar->ch_layout.nb_channels = 2;
} else { } else {
avpriv_request_sample(s, "chan %d", chan); avpriv_request_sample(s, "chan %d", chan);
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
...@@ -81,7 +81,7 @@ static int avr_read_header(AVFormatContext *s) ...@@ -81,7 +81,7 @@ static int avr_read_header(AVFormatContext *s)
return AVERROR_PATCHWELCOME; 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); avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment