Commit 94ef6864 authored by Fabrice Bellard's avatar Fabrice Bellard

suppressed packet size dependancy

Originally committed as revision 798 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0e2a2197
......@@ -161,15 +161,11 @@ static int au_read_header(AVFormatContext *s,
static int au_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
int packet_size, n, ret;
int ret;
if (url_feof(&s->pb))
return -EIO;
packet_size = url_get_packet_size(&s->pb);
n = MAX_SIZE / packet_size;
if (n <= 0)
return n = 1;
if (av_new_packet(pkt, n * packet_size))
if (av_new_packet(pkt, MAX_SIZE))
return -EIO;
pkt->stream_index = 0;
......@@ -179,7 +175,7 @@ static int au_read_packet(AVFormatContext *s,
/* note: we need to modify the packet size here to handle the last
packet */
pkt->size = ret;
return ret;
return 0;
}
static int au_read_close(AVFormatContext *s)
......
......@@ -267,15 +267,11 @@ static int wav_read_header(AVFormatContext *s,
static int wav_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
int packet_size, n, ret;
int ret;
if (url_feof(&s->pb))
return -EIO;
packet_size = url_get_packet_size(&s->pb);
n = MAX_SIZE / packet_size;
if (n <= 0)
return n = 1;
if (av_new_packet(pkt, n * packet_size))
if (av_new_packet(pkt, MAX_SIZE))
return -EIO;
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