The video renderer is extending the bitmap to suit its own memory alignment needs, but it will have adjusted the media type to match. The VIDEOINFOHEADER (or VIDEOINFOHEADER2 structure) in the media type will have an rcTarget rectangle that defines the valid area within the larger bitmap. You can query the current media type on the input pin and get hold of this information.
You will find that the renderer only needs this extended stride for some formats, so perhaps your simplest approach is to force a different capture format. An alternative is to use the sample grabber filter instead of the VMR.
G
Geraint Davies
2009-08-31 11:06:43