chenyunecjtu / coreavc-for-linux

Automatically exported from code.google.com/p/coreavc-for-linux
GNU General Public License v2.0
0 stars 1 forks source link

dshowserver maxes out CPU if mplayer is paused #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If mplayer is paused for more than 10 seconds, the main thread in dshowserver 
uses all available 
CPU. This happens in the while loop that does a sem_timedwait(), and then 
checks if the parent 
process is still alive via kill() to decide whether or not to exit.

The problem is that mplayer is still alive, but has the semaphore held while 
paused. This causes an 
infinite loop of sem_timedwait() and kill() eating up CPU time. sem_timedwait() 
has a 10 second wait 
on the first call, but on subsequent calls there is no wait; enforcing the 10 
second timeout for all 
calls fixes the problem. Patch attached.

Original issue reported on code.google.com by kart...@karthik.com on 28 May 2008 at 7:38

Attachments:

GoogleCodeExporter commented 8 years ago
I find this problem pretty annoying, would it be possible to accept the patch 
into HEAD?

Original comment by o...@yadan.net on 8 Aug 2008 at 12:54

GoogleCodeExporter commented 8 years ago
This was fixed in r61 long ago.  The example patch will no longer apply to 
current
svn.  If you are still having problems with latest svn, please let me know.

Original comment by alannis...@gmail.com on 8 Oct 2008 at 9:23