[FFmpeg-devel] ffserver live stream bug
Martin Storsjö
martin
Fri May 21 09:59:40 CEST 2010
On Thu, 20 May 2010, Baptiste Coudurier wrote:
> On 05/20/2010 01:21 PM, Ronald S. Bultje wrote:
> > Hi,
> >
> > On Wed, May 19, 2010 at 8:46 AM, Howard Chu<hyc at highlandsun.com> wrote:
> > > Howard Chu wrote:
> > > > How is it that things got to be this way? This rtsp stuff surely hasn't
> > > > worked
> > > > at all, in ages...
> > >
> > > When receiving a live stream, ffserver hits 100% CPU usage because it
> > > busyloops while reading the non-blocking input socket. It should simply
> > > return from the read loop, to allow the poll loop to continue. With this
> > > patch ffserver's CPU usage drops from 100% to only 1% while receiving and
> > > broadcasting a stream.
> > [..]
> > > - if (ff_neterrno() != FF_NETERROR(EAGAIN)&&
> > > - ff_neterrno() != FF_NETERROR(EINTR))
> > > - /* error : close connection */
> > > - goto fail;
> > > + if (ff_neterrno() == FF_NETERROR(EAGAIN) ||
> > > + ff_neterrno() == FF_NETERROR(EINTR))
> > > + return 0;
> > > + /* error : close connection */
> > > + goto fail;
> >
> > Note how the same can be accomplished by just this patch in the same place:
> >
> > + return 0;
> >
> > but yes I think this is fine, ffserver maint?
>
> The one line is better I think, ok
Applied
// Martin
More information about the ffmpeg-devel
mailing list