diff options
author | Jai Menon <jmenon86@gmail.com> | 2009-12-07 13:55:38 +0000 |
---|---|---|
committer | Jai Menon <jmenon86@gmail.com> | 2009-12-07 13:55:38 +0000 |
commit | 4da715cb247c2a107acf3cfc6e82b017357f13a3 (patch) | |
tree | 504e19ac66f04a51453e68c33eb660cd7f1f5973 /libavformat/au.c | |
parent | a8bcc7b42b275b18bbc2f65f48fa637e20847d36 (diff) | |
download | ffmpeg-4da715cb247c2a107acf3cfc6e82b017357f13a3.tar.gz |
AU : demuxed packet size should be sample size aligned.
Fixes issue 1593.
Originally committed as revision 20758 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/au.c')
-rw-r--r-- | libavformat/au.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/au.c b/libavformat/au.c index 7f119e9a4c..0ea0ea8c98 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -157,14 +157,16 @@ static int au_read_header(AVFormatContext *s, return 0; } -#define MAX_SIZE 4096 +#define BLOCK_SIZE 1024 static int au_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret; - ret= av_get_packet(s->pb, pkt, MAX_SIZE); + 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); if (ret < 0) return ret; pkt->stream_index = 0; |