[FFmpeg-devel] [PATCH] cafdec: return right code if EOF is reached

Paul B Mahol onemda at gmail.com
Tue Nov 20 12:44:50 CET 2012


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/cafdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index f166804..4216823 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -343,7 +343,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
     int64_t left      = CAF_MAX_PKT_SIZE;
 
     if (url_feof(pb))
-        return AVERROR(EIO);
+        return AVERROR_EOF;
 
     /* don't read past end of data chunk */
     if (caf->data_size > 0) {
-- 
1.7.11.4



More information about the ffmpeg-devel mailing list