Ticket #13223: 20180220_ffmpeg_ticket_13223.patch

File 20180220_ffmpeg_ticket_13223.patch, 1.4 KB (added by Peter Bennett, 3 years ago)

Proposed fix for lockout on VC1 video

  • mythtv/libs/libmythtv/mythplayer.h

    diff --git a/mythtv/libs/libmythtv/mythplayer.h b/mythtv/libs/libmythtv/mythplayer.h
    index 7fe3bb3..93870e7 100644
    a b class MTV_PUBLIC MythPlayer 
    348348                       frm_pos_map_t &durMap);
    349349
    350350    // OSD locking for TV class
    351     bool TryLockOSD(void) { return osdLock.tryLock(50); }
     351    bool TryLockOSD(int n) { return osdLock.tryLock(n); }
    352352    void LockOSD(void)    { osdLock.lock();   }
    353353    void UnlockOSD(void)  { osdLock.unlock(); }
    354354
  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index 5460cfa..5132d9c 100644
    a b void TV::HandleEndOfRecordingExitPromptTimerEvent(void) 
    35183518    }
    35193519
    35203520    PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__);
     3521    MythPlayer *player = mctx->player;
     3522    // Potential deadlock if this is called while VideoOut
     3523    // is being initialized.
     3524    if (!player->TryLockOSD(50))
     3525    {
     3526        ReturnPlayerLock(mctx);
     3527        return;
     3528    }
     3529
    35213530    OSD *osd = GetOSDLock(mctx);
    35223531    if (osd && osd->DialogVisible())
    35233532    {
    35243533        ReturnOSDLock(mctx, osd);
     3534        player->UnlockOSD();
    35253535        ReturnPlayerLock(mctx);
    35263536        return;
    35273537    }
    35283538    ReturnOSDLock(mctx, osd);
     3539    player->UnlockOSD();
    35293540
    35303541    bool do_prompt;
    35313542    mctx->LockDeletePlayer(__FILE__, __LINE__);