Revision 4da715cb libavformat/au.c

View differences:

libavformat/au.c
157 157
    return 0;
158 158
}
159 159

  
160
#define MAX_SIZE 4096
160
#define BLOCK_SIZE 1024
161 161

  
162 162
static int au_read_packet(AVFormatContext *s,
163 163
                          AVPacket *pkt)
164 164
{
165 165
    int ret;
166 166

  
167
    ret= av_get_packet(s->pb, pkt, MAX_SIZE);
167
    ret= av_get_packet(s->pb, pkt, BLOCK_SIZE *
168
                       s->streams[0]->codec->channels *
169
                       av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3);
168 170
    if (ret < 0)
169 171
        return ret;
170 172
    pkt->stream_index = 0;

Also available in: Unified diff