[FFmpeg-devel] [PATCH] mov: replace AVERROR(EOF) with AVERROR_EOF.

Nicolas George nicolas.george at normalesup.org
Wed Dec 21 15:09:43 CET 2011


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---


EOF never was a valid errno code. Even worse: on most systems, errno codes
are positive, and made negative by AVERROR(), but EOF is negative. Someone
who knows how to find a mov file with a "dref" may want to check, though.

Regards,

-- 
  Nicolas George



 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3aa9381..e18c861 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -432,7 +432,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
             for (type = 0; type != -1 && avio_tell(pb) < next; ) {
                 if(url_feof(pb))
-                    return AVERROR(EOF);
+                    return AVERROR_EOF;
                 type = avio_rb16(pb);
                 len = avio_rb16(pb);
                 av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
-- 
1.7.7.3



More information about the ffmpeg-devel mailing list