From e33a1695bab717d2dd3a7e5c289ed822437b187f Mon Sep 17 00:00:00 2001 From: voroshil Date: Fri, 23 Feb 2007 08:07:07 +0000 Subject: Fixed loading of VoxWare and wma9sp binary audio codecs using dshow engine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22322 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/dshow/allocator.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'loader/dshow/allocator.c') diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c index 3e2fc8c017..7eef9ada0f 100644 --- a/loader/dshow/allocator.c +++ b/loader/dshow/allocator.c @@ -146,8 +146,14 @@ static HRESULT STDCALL MemAllocator_SetProperties(IMemAllocator * This, return E_FAIL; *pActual = *pRequest; - //if (pActual->cbBuffer == 2) - // pActual->cbBuffer = 576; + /* + DirectShow DOCS ("Negotiating Allocators" chapter) says that allocator might not + honor the requested properties. Thus, since WMSP audio codecs requests bufer with two + bytes length for unknown reason, we should correct requested value. Otherwise above + codec don't want to load. + */ + if (pActual->cbBuffer == 2) + pActual->cbBuffer = 10240; //Enough for WMSP codec me->props = *pActual; -- cgit v1.2.3