mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
boa: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
96b64bd948
commit
8269fbcb7a
@ -55,15 +55,16 @@ static int read_header(AVFormatContext *s)
|
||||
avio_rl32(s->pb);
|
||||
avio_rl32(s->pb);
|
||||
st->codecpar->sample_rate = avio_rl32(s->pb);
|
||||
st->codecpar->channels = avio_rl32(s->pb);
|
||||
if (st->codecpar->channels > FF_SANE_NB_CHANNELS || st->codecpar->channels <= 0)
|
||||
st->codecpar->ch_layout.nb_channels = avio_rl32(s->pb);
|
||||
if (st->codecpar->ch_layout.nb_channels > FF_SANE_NB_CHANNELS ||
|
||||
st->codecpar->ch_layout.order <= 0)
|
||||
return AVERROR(ENOSYS);
|
||||
ffformatcontext(s)->data_offset = data_offset = avio_rl32(s->pb);
|
||||
avio_r8(s->pb);
|
||||
st->codecpar->block_align = avio_rl32(s->pb);
|
||||
if (st->codecpar->block_align > INT_MAX / FF_SANE_NB_CHANNELS || st->codecpar->block_align <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
st->codecpar->block_align *= st->codecpar->channels;
|
||||
st->codecpar->block_align *= st->codecpar->ch_layout.nb_channels;
|
||||
|
||||
avio_seek(s->pb, data_offset, SEEK_SET);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user