[FFmpeg-devel] [PATCH] avoid infinite loop when seeking flv and non seekable input

Michael Niedermayer michaelni
Thu Jul 24 15:07:11 CEST 2008


On Wed, Jul 23, 2008 at 08:35:49PM -0700, Baptiste Coudurier wrote:
> Hi Michael,
> 
> Michael Niedermayer wrote:
> > On Tue, Jul 22, 2008 at 07:41:51PM -0700, Baptiste Coudurier wrote:
> >> Hi,
> >>
> >> $subject,
> >>
> >> Reproduceable when trying to seek and input is non seekable (like http
> >> through ffserver).
> >>
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2705408, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2763520, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2818048, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2856192, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2889728, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 0, size 11469089, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2949120, flags 0
> >> [flv @ 0x8e27eb0]skipping flv packet: type 32, size 2987264, flags 0
> >>
> >> With patch resync happens faster:
> > 
> > I dont understand the problem, "trying to seek and input is non seekable"
> > makes no sense to me. If the input is unseekable, seeking wont succeed
> > anyway.
> 
> It will it when seeking forward, aviobuf.c:
> } else if(s->is_streamed && !s->write_flag &&
>        offset1 >= 0 && offset1 < (s->buf_end - s->buffer) + (1<<16)){

indeed
this could be fixed by removing  "offset1 < (s->buf_end - s->buffer) + (1<<16)"
or increasing (1<<16)
feel free to change that.

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080724/f42ed306/attachment.pgp>



More information about the ffmpeg-devel mailing list