Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

another check

  • Loading branch information...
commit ee837606d5b47c066ca119ad99e60e945f1eb814 1 parent dca5b20
@rdp authored
View
1  source_code/acam/directshow_fillbuffer.cpp
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "acam.h"
-
CCritSec m_cSharedState;
//
View
9 source_code/acam/directshow_stuff.cpp
@@ -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;}
Please sign in to comment.
Something went wrong with that request. Please try again.