Ticket #12754: libcec2-deadlock-fix.patch

File libcec2-deadlock-fix.patch, 1.1 KB (added by bbaetz@…, 4 years ago)

patch

  • mythtv/libs/libmythui/cecadapter.cpp

    diff --git a/mythtv/libs/libmythui/cecadapter.cpp b/mythtv/libs/libmythui/cecadapter.cpp
    index 00a8c73..10b7f87 100644
    a b class CECAdapterPriv 
    166166
    167167        LOG(VB_GENERAL, LOG_INFO, LOC + "Opened CEC device.");
    168168
    169         // all good to go
    170         valid = true;
    171 
    172169        // turn on tv (if configured)
    173170        powerOnTV = powerOnTVOnStart;
    174171
    175172        // switch input (if configured)
    176173        switchInput = true;
    177174
    178         HandleActions();
     175        // all good to go
     176        valid = true;
    179177
    180178        return true;
    181179    }
    CECAdapter::CECAdapter() : MThread("CECAdapter"), m_priv(new CECAdapterPriv) 
    721719
    722720void CECAdapter::run()
    723721{
     722    // Handle any actions at startup
     723    // This is done outside the lock to handle initial setup -
     724    // we know that nothing else can be calling us this early.
     725    m_priv->HandleActions();
     726
    724727    for (;;) {
    725728        // Note that a lock is used because the QWaitCondition needs it
    726729        // None of the other HandleActions callers need the lock because