Quantcast
Channel: DirectShow – Fooling Around
Viewing all articles
Browse latest Browse all 72

Small correction for DirectShow BaseClasses CTransInPlaceFilter::Copy

$
0
0

False assertion failure in DirectShow BaseClasses transip.cpp, in CTransInPlaceFilter::Copy:

ASSERT(lDestSize >= lSourceSize && lDestSize >= lDataLength);
[...]
CopyMemory((PVOID) pDestBuffer, (PVOID) pSourceBuffer, lDataLength);

The code asserts on “lDestSize >= lSourceSize” which is true in most cases, but it does not have or need to be true. The code below copies just lDataLength bytes and assertion on buffer sizes is, generally, excessive. Valid scenarios do exist with this assertion popping up for no reason.


Viewing all articles
Browse latest Browse all 72

Trending Articles