Permalink
Browse files

another check

  • Loading branch information...
1 parent dca5b20 commit ee837606d5b47c066ca119ad99e60e945f1eb814 @rdp committed Aug 22, 2012
Showing with 6 additions and 4 deletions.
  1. +0 −1 source_code/acam/directshow_fillbuffer.cpp
  2. +6 −3 source_code/acam/directshow_stuff.cpp
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "acam.h"
-
CCritSec m_cSharedState;
//
@@ -454,12 +454,14 @@ extern long pBufLocalSize;
extern long pBufOriginalSize;
HRESULT STDMETHODCALLTYPE CVCamStream::SuggestAllocatorProperties( /* [in] */ const ALLOCATOR_PROPERTIES *pprop) {
- // maybe we shouldn't even care though...I mean like seriously...only make it bigger never smaller?
+ // maybe we shouldn't even care though...I mean like seriously...why let them make it smaller <sigh>
+ // LODO test it both ways with FME, fast computer/slow computer does it make a difference?
int requested = pprop->cbBuffer;
if(pprop->cBuffers > 0)
- requested *= pprop->cBuffers;
- requested += pprop->cbPrefix;
+ requested *= pprop->cBuffers;
+ if(pprop->cbPrefix > 0)
+ requested += pprop->cbPrefix;
if(requested <= pBufOriginalSize) {
pBufLocalSize = requested;
@@ -468,4 +470,5 @@ HRESULT STDMETHODCALLTYPE CVCamStream::SuggestAllocatorProperties( /* [in] */ co
return E_FAIL;
}
}
+
HRESULT STDMETHODCALLTYPE CVCamStream::GetAllocatorProperties( ALLOCATOR_PROPERTIES *pprop) {return NULL;}

0 comments on commit ee83760

Please sign in to comment.