Commit 588244c3 authored by jai_menon's avatar jai_menon

AU : demuxed packet size should be sample size aligned.

Fixes issue 1593.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20758 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 986550e4
...@@ -157,14 +157,16 @@ static int au_read_header(AVFormatContext *s, ...@@ -157,14 +157,16 @@ static int au_read_header(AVFormatContext *s,
return 0; return 0;
} }
#define MAX_SIZE 4096 #define BLOCK_SIZE 1024
static int au_read_packet(AVFormatContext *s, static int au_read_packet(AVFormatContext *s,
AVPacket *pkt) AVPacket *pkt)
{ {
int ret; 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) if (ret < 0)
return ret; return ret;
pkt->stream_index = 0; pkt->stream_index = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment