[FFmpeg-devel] [PATCH] HLS problem

Reimar Döffinger Reimar.Doeffinger
Thu Jan 13 08:04:44 CET 2011

On Thu, Jan 13, 2011 at 08:30:59AM +0200, Martin Storsj? wrote:
> On Wed, 12 Jan 2011, Reimar D?ffinger wrote:
> > On Wed, Jan 12, 2011 at 06:57:07PM +0100, Michael Niedermayer wrote:
> > > 
> > > About ByteIOContext, which part does not handle incomplete reads?
> > 
> > Hm, looks like I vastly overestimated the issue, in which case I agree
> > above patch is not acceptable.
> > I haven't tested it, but I suspect that get_buffer and fill_buffer both
> > need to handle EAGAIN.
> > I don't fully understand that though, since that really should lead to EOF instead
> > of constant decode errors...
> Exactly, if that's the issue, it would be much more visible.
> One wild guess on what's wrong is the mpegts demuxer trying to do a bit of 
> backwards seeks. If filling all of the ByteIOContext buffer with 
> url_read_complete, these backwards seeks probably work better than if we 
> only buffer as much data at a time as the lower protocol function returns.

Your theory relies on backwards seeks. Backwards seeks would also clear EOF,
so if you assume that still leaves EAGAIN as possible reason (and yes, someone
needs to debug it properly, but that's always a pain with network stuff).

More information about the ffmpeg-devel mailing list