Menu

#511 Wrong NonDelegatingInterface in OutputPin of LAME Directshow filter

Compatibility
open
nobody
None
5
2021-09-22
2021-09-22
Julio Jose
No

Hello.

There is a bug in the LAME directshow filter.
The NonDelegatingQueryInterface method of the outputpin is calling its grandparent not the parent

The actual method

STDMETHODIMP CMpegAudEncOutPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
{
    if(riid == IID_IAMStreamConfig) {
        CheckPointer(ppv, E_POINTER);
        return GetInterface((IAMStreamConfig*)(this), ppv);
    }
    return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
}

its calling CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv); but it inherits from CTransformOutputPin so it should be

STDMETHODIMP CMpegAudEncOutPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
{
    if(riid == IID_IAMStreamConfig) {
        CheckPointer(ppv, E_POINTER);
        return GetInterface((IAMStreamConfig*)(this), ppv);
    }
    return CTransformOutputPin::NonDelegatingQueryInterface(riid, ppv);
}

The bug disables seeking when the filter is on a graph.

Thanks in advance

Julio

Discussion


Log in to post a comment.

MongoDB Logo MongoDB