Mercurial > libavformat.hg
changeset 5421:26a5d390beb0 libavformat
AU : demuxed packet size should be sample size aligned.
Fixes issue 1593.
author | jai_menon |
---|---|
date | Mon, 07 Dec 2009 13:55:38 +0000 |
parents | 62329840eb7c |
children | 3e5fefc4b475 |
files | au.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/au.c Sun Dec 06 07:03:46 2009 +0000 +++ b/au.c Mon Dec 07 13:55:38 2009 +0000 @@ -157,14 +157,16 @@ 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;