[FFmpeg-cvslog] xa: fix end-of-file handling
Justin Ruggles
git at videolan.org
Wed Mar 21 02:35:02 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Mar 20 11:53:56 2012 -0400| [64de57f64515001225ec8d8d6b3a7d567fc9cdcd] | committer: Justin Ruggles
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).
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64de57f64515001225ec8d8d6b3a7d567fc9cdcd
---
libavformat/xa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/xa.c b/libavformat/xa.c
index 82b703f..aacdd2b 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -100,8 +100,8 @@ static int xa_read_packet(AVFormatContext *s,
unsigned int packet_size;
int ret;
- if(xa->sent_bytes > xa->out_size)
- return AVERROR(EIO);
+ if (xa->sent_bytes >= xa->out_size)
+ return AVERROR_EOF;
/* 1 byte header and 14 bytes worth of samples * number channels per block */
packet_size = 15*st->codec->channels;
More information about the ffmpeg-cvslog
mailing list