[FFmpeg-cvslog] au: set block_align and use it in au_read_packet()
Justin Ruggles
git at videolan.org
Thu Jan 10 10:56:49 CET 2013
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Dec 23 13:20:59 2012 -0500| [bd4cdef5a8ca0389f8266a172988bd74aaaf4c77] | committer: Justin Ruggles
au: set block_align and use it in au_read_packet()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd4cdef5a8ca0389f8266a172988bd74aaaf4c77
---
libavformat/au.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/au.c b/libavformat/au.c
index f1038da..fcc599b 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -112,6 +112,7 @@ static int au_read_header(AVFormatContext *s)
st->codec->channels = channels;
st->codec->sample_rate = rate;
st->codec->bit_rate = channels * rate * bps;
+ st->codec->block_align = channels * bps >> 3;
avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}
@@ -123,9 +124,8 @@ static int au_read_packet(AVFormatContext *s,
{
int ret;
- ret= av_get_packet(s->pb, pkt, BLOCK_SIZE *
- s->streams[0]->codec->channels *
- av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3);
+ ret = av_get_packet(s->pb, pkt, BLOCK_SIZE *
+ s->streams[0]->codec->block_align);
if (ret < 0)
return ret;
pkt->stream_index = 0;
More information about the ffmpeg-cvslog
mailing list