[MPlayer-dev-eng] [PATCH] stream/stream_ffmpeg.c: convert to avio API

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Mar 25 11:22:17 CEST 2012

On Sat, Mar 24, 2012 at 05:19:15PM -0400, Alexis Ballier wrote:
> 2012/3/24 Reimar Döffinger <Reimar.Doeffinger at gmx.de>:
> > On Fri, Mar 23, 2012 at 05:54:21AM -0400, Alexis Ballier wrote:
> >> Appears to work fine and unbreaks the build with recent shared ffmpeg.
> >
> > As mentioned on -cvslog, the avio API has issues and should not
> > be used if not necessary at the very least.
> to be honest i was expecting comments like that, but:
> - Is the buffering that terrible for reading? I mean, this may be
> useless but I dont understand how it can hurt. For me, this also
> leaves the liberty to the library to fill the buffer with how many
> buffer it wishes.

It means at least one addition memcpy, which for > 100 MBit/s MPEG2
can be enough to make decoding too slow (and yes, I have actually seen
It will also (sometimes) split large reads into multiple small ones,
which e.g. for high-latency wireless network can completely break
Btw. the "sometimes" means that you are not at all at liberty to do
anything from libavformat side you couldn't do before (though I don't
really understand the argument anyway).
A workaround would seem to be to set the buffer size to 0, however
that obviously was never tested since it will cause an endless loop
when writing (!).
Thus using avio_* will have to start with fixing that API, and not
first using it and the leaving it to someone else to fix the issues,
I am not willing of being forced into maintaining shared lib builds
by people first committing broken stuff and expecting me to fix it up

More information about the MPlayer-dev-eng mailing list