[SCM] libav/experimental: simplify seek() failure check

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:51:03 UTC 2013


The following commit has been merged in the experimental branch:
commit 3b9a913db4d303a0305a80de496b1933cba8980f
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Sep 26 16:09:56 2006 +0000

    simplify seek() failure check
    
    Originally committed as revision 6339 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index e0832c6..ef72c19 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -123,9 +123,6 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
         /* 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 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
             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;
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list