mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-22 23:33:11 +00:00
au: set block_align and use it in au_read_packet()
This commit is contained in:
parent
9a7b56883d
commit
bd4cdef5a8
@ -112,6 +112,7 @@ static int au_read_header(AVFormatContext *s)
|
|||||||
st->codec->channels = channels;
|
st->codec->channels = channels;
|
||||||
st->codec->sample_rate = rate;
|
st->codec->sample_rate = rate;
|
||||||
st->codec->bit_rate = channels * rate * bps;
|
st->codec->bit_rate = channels * rate * bps;
|
||||||
|
st->codec->block_align = channels * bps >> 3;
|
||||||
avpriv_set_pts_info(st, 64, 1, rate);
|
avpriv_set_pts_info(st, 64, 1, rate);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -123,9 +124,8 @@ static int au_read_packet(AVFormatContext *s,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret= av_get_packet(s->pb, pkt, BLOCK_SIZE *
|
ret = av_get_packet(s->pb, pkt, BLOCK_SIZE *
|
||||||
s->streams[0]->codec->channels *
|
s->streams[0]->codec->block_align);
|
||||||
av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
pkt->stream_index = 0;
|
pkt->stream_index = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user