[Ffmpeg-devel] [PATCH] flv with streamed ByteIO support

Michael Niedermayer michaelni
Tue Sep 26 19:28:03 CEST 2006


Hi

On Tue, Sep 26, 2006 at 11:56:59PM +0900, nazo wrote:
[...]
> >>@@ -136,8 +138,13 @@
> >>             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->opaque, offset, SEEK_SET) == (offset_t)-EPIPE){
> >>+            if(offset >= s->pos){
> >>+                skip_buffer(s, offset - s->pos);
> >>+                return offset;
> >>+            }
> >>             return -EPIPE;
> >>+        }
> >
> >IMHO you should rather fix avio.c url_seek() instead of doing a url_fseek()
> >specific fix
> I did so(see the attached patch), but I dont think that is good.

indeed you are right, i didnt realize that implementing this in url_seek()
would be more complicated
so ive fixed it in url_fseek(), ive not applied your patch as it seems
to be buggy for writeable streams and large forward seeks (would be 
very slow, failure is better IMHO)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list