diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-05-06 21:43:45 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-05-06 21:43:45 +0000 |
commit | c8b40d3bd00cab519ea4e55116332efd12f9b381 (patch) | |
tree | 51c56b549f24c395c830c196fc099e0240c4fc21 /loader/dshow/allocator.c | |
parent | 0742d52b569e69d3df278afb388abd76e384b7c8 (diff) |
avifile-0.6-CVS merge
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@714 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/allocator.c')
-rw-r--r-- | loader/dshow/allocator.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c index 496d56c66f..e4a209626b 100644 --- a/loader/dshow/allocator.c +++ b/loader/dshow/allocator.c @@ -2,6 +2,8 @@ #include "allocator.h" #include <com.h> #define E_NOTIMPL 0x80004001 +using namespace std; + class AllocatorKeeper { public: @@ -36,6 +38,9 @@ MemAllocator::MemAllocator() props.cBuffers=1; props.cbBuffer=65536;/* :/ */ props.cbAlign=props.cbPrefix=0; + + new_pointer=0; + modified_sample=0; } long MemAllocator::CreateAllocator(GUID* clsid, GUID* iid, void** ppv) @@ -131,6 +136,14 @@ HRESULT STDCALL MemAllocator::GetBuffer ( me->used_list.push_back(*it); *ppBuffer=*it; (*ppBuffer)->vt->AddRef((IUnknown*)*ppBuffer); + if(me->new_pointer) + { + if(me->modified_sample) + me->modified_sample->ResetPointer(); + (*it)->SetPointer(me->new_pointer); + me->modified_sample=*it; + me->new_pointer=0; + } me->free_list.remove(*it); return 0; } |