[FFmpeg-devel] [PATCH] Yield on AVERROR(EAGAIN).
Måns Rullgård
mans
Fri Mar 5 03:13:39 CET 2010
Michael Niedermayer <michaelni at gmx.at> writes:
> On Thu, Mar 04, 2010 at 09:22:44PM -0300, 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?
>
> try it with 2 processes of equal priority
> without yield they should be 50% each if one yields the other should get
> 100% in theory
>
>>
>> Ramiro Polla
>
>> ffmpeg.c | 1 +
>> libavformat/os_support.h | 16 ++++++++++++++++
>> libavformat/utils.c | 5 ++++-
>> 3 files changed, 21 insertions(+), 1 deletion(-)
>> 500496eb221c93827504d8eb615c143c82f532a1 ff_yield.diff
>
> ok
Not OK.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list