diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-12-09 23:33:49 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-12-09 23:33:49 +0300 |
commit | fd68d673eb12a728a7da12bfe61843d2cc7cc435 (patch) | |
tree | f5409cc203a1c3376a2ad2965902458c532bc01c /decoder | |
parent | 5820a245fe289e96f1ec98ec974a1b4c327e3e23 (diff) |
Implement a blacklist feature to allow disabling LAV for uncooperative applications.
There is no GUI option for this, nor is there a pre-populated list of applications.
Original patch by clsid.
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVAudio/LAVAudio.cpp | 3 | ||||
-rw-r--r-- | decoder/LAVVideo/LAVVideo.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp index f8de1351..f251697a 100644 --- a/decoder/LAVAudio/LAVAudio.cpp +++ b/decoder/LAVAudio/LAVAudio.cpp @@ -1432,6 +1432,9 @@ HRESULT CLAVAudio::CheckConnect(PIN_DIRECTION dir, IPin *pPin) { DbgLog((LOG_TRACE, 5, L"CheckConnect -- %S", dir == PINDIR_INPUT ? "in" : "out")); if (dir == PINDIR_INPUT) { + if (!m_bRuntimeConfig && CheckApplicationBlackList(LAVC_AUDIO_REGISTRY_KEY L"\\Blacklist")) + return E_FAIL; + // TODO: Check if the upstream source filter is LAVFSplitter, and store that somewhere // Validate that this is called before any media type negotiation } else if (dir == PINDIR_OUTPUT) { diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp index a6e194c9..d40a8eb6 100644 --- a/decoder/LAVVideo/LAVVideo.cpp +++ b/decoder/LAVVideo/LAVVideo.cpp @@ -770,6 +770,9 @@ HRESULT CLAVVideo::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, doubl HRESULT CLAVVideo::CheckConnect(PIN_DIRECTION dir, IPin *pPin) { if (dir == PINDIR_INPUT) { + if (!m_bRuntimeConfig && CheckApplicationBlackList(LAVC_VIDEO_REGISTRY_KEY L"\\Blacklist")) + return E_FAIL; + if (FilterInGraphSafe(pPin, CLSID_LAVVideo, TRUE)) { DbgLog((LOG_TRACE, 10, L"CLAVVideo::CheckConnect(): LAVVideo is already in this graph branch, aborting.")); return E_FAIL; |