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

michael subversion
Tue Sep 26 18:09:56 CEST 2006


Author: michael
Date: Tue Sep 26 18:09:56 2006
New Revision: 6339

Modified:
   trunk/libavformat/aviobuf.c

Log:
simplify seek() failure check


Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c	(original)
+++ trunk/libavformat/aviobuf.c	Tue Sep 26 18:09:56 2006
@@ -123,9 +123,6 @@
         /* can do the seek inside the buffer */
         s->buf_ptr = s->buffer + offset1;
     } else {
-        if (!s->seek)
-            return -EPIPE;
-
 #ifdef CONFIG_MUXERS
         if (s->write_flag) {
             flush_buffer(s);
@@ -136,7 +133,7 @@
             s->buf_end = s->buffer;
         }
         s->buf_ptr = s->buffer;
-        if (s->seek(s->opaque, offset, SEEK_SET) == (offset_t)-EPIPE)
+        if (!s->seek || s->seek(s->opaque, offset, SEEK_SET) == (offset_t)-EPIPE)
             return -EPIPE;
         s->pos = offset;
     }




More information about the ffmpeg-cvslog mailing list