summaryrefslogtreecommitdiffstats
path: root/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp')
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
index 1dca465..7b66d56 100644
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
@@ -121,6 +121,10 @@ void DirectShowIOSource::setAllocator(IMemAllocator *allocator)
// IUnknown
HRESULT DirectShowIOSource::QueryInterface(REFIID riid, void **ppvObject)
{
+ // 2dd74950-a890-11d1-abe8-00a0c905f375
+ static const GUID iid_IAmFilterMiscFlags = {
+ 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75}};
+
if (!ppvObject) {
return E_POINTER;
} else if (riid == IID_IUnknown
@@ -128,7 +132,7 @@ HRESULT DirectShowIOSource::QueryInterface(REFIID riid, void **ppvObject)
|| riid == IID_IMediaFilter
|| riid == IID_IBaseFilter) {
*ppvObject = static_cast<IBaseFilter *>(this);
- } else if (riid == IID_IAMFilterMiscFlags) {
+ } else if (riid == iid_IAmFilterMiscFlags) {
*ppvObject = static_cast<IAMFilterMiscFlags *>(this);
} else if (riid == IID_IPin) {
*ppvObject = static_cast<IPin *>(this);
@@ -414,8 +418,8 @@ HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
} else if (!m_allocator) {
hr = VFW_E_NO_TRANSPORT;
- if (IMemInputPin *memPin = com_cast<IMemInputPin>(pin)) {
- if ((m_allocator = com_new<IMemAllocator>(CLSID_MemoryAllocator))) {
+ if (IMemInputPin *memPin = com_cast<IMemInputPin>(pin, IID_IMemInputPin)) {
+ if ((m_allocator = com_new<IMemAllocator>(CLSID_MemoryAllocator, IID_IMemAllocator))) {
ALLOCATOR_PROPERTIES properties;
if (memPin->GetAllocatorRequirements(&properties) == S_OK
|| m_allocator->GetProperties(&properties) == S_OK) {