[mythtv-commits] Ticket #9579: 100% CPU on one core when paused

MythTV noreply at mythtv.org
Sun Apr 17 13:17:37 UTC 2011


#9579: 100% CPU on one core when paused
-------------------------------------+--------------------------
 Reporter:  mythtv@…                 |          Owner:  mdean
     Type:  Bug Report               |         Status:  accepted
 Priority:  minor                    |      Milestone:  unknown
Component:  MythTV - Video Playback  |        Version:  0.24
 Severity:  low                      |     Resolution:
 Keywords:                           |  Ticket locked:  0
-------------------------------------+--------------------------

Comment (by bugs@…):

 Same problem here on Fedora 14 (0.24-fixes, 464fa28373) with closed-source
 nvidia video driver, VDPAU output and !PulseAudio.

 I think I can pinpoint the problem to the audio output, specifically to
 this part of `audiooutputbase.cpp`:
 {{{
 void AudioOutputBase::OutputAudioLoop(void)
 {
     ...

     while (!killaudio)
     {
         if (pauseaudio)
         {
             if (!actually_paused)
             {
                 VBAUDIO("OutputAudioLoop: audio paused");
                 OutputEvent e(OutputEvent::Paused);
                 dispatch(e);
                 was_paused = true;
             }

             actually_paused = true;
             audiotime = 0; // mark 'audiotime' as invalid.

             // only send zeros if card doesn't already have at least one
             // fragment of zeros -dag
             WriteAudio(zeros, zero_fragment_size);
             continue;
         }
         else
         {
             ...
         }
 }}}

 By adding
 {{{
 usleep(10000);
 }}}
 after the call to `WriteAudio()`, the CPU load goes down from 100% to less
 than 10% when pausing.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9579#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list