xa: fix end-of-file handling
Do not output an extra packet when out_size is reached. Also return AVERROR_EOF instead of AVERROR(EIO).
This commit is contained in:
parent
cd2ffb67ad
commit
64de57f645
@ -100,8 +100,8 @@ static int xa_read_packet(AVFormatContext *s,
|
|||||||
unsigned int packet_size;
|
unsigned int packet_size;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if(xa->sent_bytes > xa->out_size)
|
if (xa->sent_bytes >= xa->out_size)
|
||||||
return AVERROR(EIO);
|
return AVERROR_EOF;
|
||||||
/* 1 byte header and 14 bytes worth of samples * number channels per block */
|
/* 1 byte header and 14 bytes worth of samples * number channels per block */
|
||||||
packet_size = 15*st->codec->channels;
|
packet_size = 15*st->codec->channels;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user