[FFmpeg-devel] [PATCH] RTMP: Return from rtmp_read as soon as some data is available
Fri Jun 18 13:42:58 CEST 2010
On Fri, 18 Jun 2010, Kostya wrote:
> On Fri, Jun 18, 2010 at 02:31:06PM +0300, Martin Storsj? wrote:
> > Hi,
> > This changes rtmp_read to return as soon as some data is available,
> > instead of returning only when the whole request buffer is filled. The
> > earlier behaviour lead to high latency when receiving low-bandwidth
> > streams.
> Arbetar det med FFmpeg FLV demuxer? Kanske bra.
Jo, den fungerar fint med libavformats flv demuxer. :-)
It's all wrapped in an ByteIOContext for the demuxers anyway, and accessed
through fill_buffer() (which is allowed to return as soon as it has read
at least one byte as far as I understand it) or get_buffer() which loops
until it has got as much data as it needs. The problem it fixes is that
fill_buffer requests a 32k buffer, which blocks for way too long when the
packets themselves are much shorter.
More information about the ffmpeg-devel