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

Michael Niedermayer michaelni
Fri Mar 5 16:16:40 CET 2010


On Fri, Mar 05, 2010 at 10:17:57AM -0300, Ramiro Polla wrote:
> On Fri, Mar 5, 2010 at 10:13 AM, Nicolas George
> <nicolas.george at normalesup.org> wrote:
> > Le quartidi 14 vent?se, an CCXVIII, Ramiro Polla a ?crit?:
> >> ? ? ? ? ?ret = av_read_frame_internal(ic, &pkt1);
> >> - ? ? ? ?if(ret == AVERROR(EAGAIN))
> >> + ? ? ? ?if(ret == AVERROR(EAGAIN)) {
> >> + ? ? ? ? ? ?ff_yield();
> >> ? ? ? ? ? ? ?continue;
> >> + ? ? ? ?}
> >
> > What gain do you expect from that code, be it the current or modified
> > version?
> 
> CPU usage.

which also mean more cpu time for other apps
and battery time, and finally indirectly less co2 ;)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100305/d6194664/attachment.pgp>



More information about the ffmpeg-devel mailing list