[Ffmpeg-cvslog] r7736 - trunk/libavformat/aviobuf.c

bcoudurier subversion
Sun Jan 28 03:38:02 CET 2007


Author: bcoudurier
Date: Sun Jan 28 03:38:02 2007
New Revision: 7736

Modified:
   trunk/libavformat/aviobuf.c

Log:
proper error handling in file size retrieval, patch by Ronald S. Bultje rbultje at ronald bitfreak net

Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c	(original)
+++ trunk/libavformat/aviobuf.c	Sun Jan 28 03:38:02 2007
@@ -172,7 +172,9 @@
         return -EPIPE;
     size = s->seek(s->opaque, 0, AVSEEK_SIZE);
     if(size<0){
-        size = s->seek(s->opaque, -1, SEEK_END) + 1;
+        if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)
+            return size;
+        size++;
         s->seek(s->opaque, s->pos, SEEK_SET);
     }
     return size;




More information about the ffmpeg-cvslog mailing list