diff options
author | 2007-02-23 16:30:10 +0000 | |
---|---|---|
committer | 2007-02-23 16:30:10 +0000 | |
commit | 09d15d04c2dfa7009198a598d187dcf81517f5fe (patch) | |
tree | 7e401c0c190baa400a5dfa48cbb7f0232bfa6f44 /loader/dshow/DS_VideoDecoder.c | |
parent | fe35a2d081efedaffe32f96fad5381968e3731a6 (diff) |
Fix loading of mpeg4ds direct show video codec under win32, broken in r22322
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22325 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/DS_VideoDecoder.c')
-rw-r--r-- | loader/dshow/DS_VideoDecoder.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c index cfeedc0c3c..358c14ffb3 100644 --- a/loader/dshow/DS_VideoDecoder.c +++ b/loader/dshow/DS_VideoDecoder.c @@ -418,6 +418,7 @@ int DS_VideoDecoder_DecodeInternal(DS_VideoDecoder *this, const void* src, int s int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp) { HRESULT result; + ALLOCATOR_PROPERTIES props,props1; int should_test=1; int stoped = 0; @@ -609,6 +610,24 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp printf("Error reconnecting input pin 0x%x\n", (int)result); return -1; } + + if(this->m_pDS_Filter->m_pAll) + this->m_pDS_Filter->m_pAll->vt->Release(this->m_pDS_Filter->m_pAll); + this->m_pDS_Filter->m_pAll=MemAllocatorCreate(); + if (!this->m_pDS_Filter->m_pAll) + { + printf("Call to MemAllocatorCreate failed\n"); + return -1; + } + //Seting allocator property according to our media type + props.cBuffers=1; + props.cbBuffer=this->m_sDestType.lSampleSize; + props.cbAlign=1; + props.cbPrefix=0; + this->m_pDS_Filter->m_pAll->vt->SetProperties(this->m_pDS_Filter->m_pAll, &props, &props1); + //Notify remote pin about choosed allocator + this->m_pDS_Filter->m_pImp->vt->NotifyAllocator(this->m_pDS_Filter->m_pImp, this->m_pDS_Filter->m_pAll, 0); + result = this->m_pDS_Filter->m_pOutputPin->vt->ReceiveConnection(this->m_pDS_Filter->m_pOutputPin, (IPin *)this->m_pDS_Filter->m_pOurOutput, &this->m_sDestType); |