[FFmpeg-devel] [PATCH] Yield on AVERROR(EAGAIN).

Luca Abeni lucabe72
Fri Mar 5 08:14:59 CET 2010


Ramiro Polla wrote:
> Hi,
> 
> Currently FFmpeg eats 100% cpu on devices that return EAGAIN. Attached
> patch makes FFmpeg yield when it gets EAGAIN. In Windows it gets down
> to normal cpu levels, but on Linux this didn't work as I expected, it
> still eats 100% cpu. Any ideas?

I think this happens because sched_yeld() does not work as people expect
with SCHED_OTHER tasks (see other email). Using "usleep(10000)" instead
should solve the problem.


			Luca



More information about the ffmpeg-devel mailing list