Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: vdr[3330]: ERROR: can't record MPEG1! - possible cause



Hi,

Klaus Schmidinger wrote:

[...]

> I've done that now (in thread.h for the moment) and have uploaded a modified
> patch to
> 
>   ftp://ftp.cadsoft.de/pub/etc/vdr/mutex.diff
> 
> in which I have generally made the mutexes recursive.
> Unfortunately, after a few channel switchings, there appears to be
> a deadlock of some kind and I need to "kill -9" VDR...
> Did I do something wrong?


Something very small, but it is unlikely to be the problem,

  // --- cThread 
---------------------------------------------------------------
@@ -96,8 +94,7 @@
       signalHandlerInstalled = true;
       }
    running = false;
-  parentPid = threadPid = lockingPid = 0;
-  locked = 0;
+  parentPid = threadPid;
  }
     ^^^^^^^^^^^^^^^^^^^^^^^^^

this should be 'parentPid = threadPid = 0;'

I tested it now, and it appears to run, haven't tested the channel 
switching though.

BTW: Putting the cMutex::Lock() and cMutex::Unlock() in the header will 
result in better optimized code as the compiler can inline both methods.

Andreas





Home | Main Index | Thread Index