[mythtv-commits] Ticket #6355: Mythfrontend hangs when rewinding and then returning to playback via LIRC remote control

MythTV mythtv at cvs.mythtv.org
Mon Mar 16 20:58:11 UTC 2009


#6355: Mythfrontend hangs when rewinding and then returning to playback via LIRC
remote control
---------------------------------------+------------------------------------
 Reporter:  tomimo at ncircle.nullnet.fi  |        Owner:  ijr    
     Type:  defect                     |       Status:  new    
 Priority:  minor                      |    Milestone:  unknown
Component:  MythTV - Video Playback    |      Version:  head   
 Severity:  medium                     |   Resolution:         
  Mlocked:  0                          |  
---------------------------------------+------------------------------------

Comment(by tomimo at ncircle.nullnet.fi):

 Ok, it seems that at least in my case the hang comes from the fact that
 there is absolutely no synchronization between the LIRC remote controller
 and for example the following code in:


 {{{
 void NuppelVideoPlayer::StartPlaying()
 ...
         if (rewindtime > 0 && ffrew_skip == 1)
         {
             rewindtime = CalcRWTime(rewindtime);

             if (rewindtime >= 1)
             {
                 QMutexLocker locker(&internalPauseLock);

                 PauseVideo(true);
                 DoRewind();
                 UnpauseVideo(true);
             }
             rewindtime = 0;
         }
 ...
 }}}


 The deadlock usually happens from the fact that while rewinding and then
 returning to normal playback, the DoPlay() call comes BEFORE the
 StartPlaying's PauseVideo()-call and that's it
 in this case. Nobody will will send the wakeup-signal afterwards. We have
 to remember that the
 remote control callback can come pretty much anytime, so wrapping the
 DoPlay()'s couple of last lines with QMutexLocker
 locker(&internalPauseLock) is not enough because the WHOLE StartPlaying's
 huge while loop has not been locked with that same lock.
 ---> deadlock might become more rare, but eventually there would be a time
 when the callback would come before the above showed StartPlaying's block
 resulting again another deadlock.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/6355#comment:2>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list