Original Post
I used vfw to get a BITMAPINFOHEADER of the frame I want to render and I managed to blit it to the backbuffer using StretchRect but all I get is this: www.ireallydontcare.com/asaf/test.jpg that doesn't work well and it's very slow I tried locking the surface and copying the data, but that didn't fix the problem and was even slower the part that retrieves the frame is working, I took it from a sample I found that renders video to a DirectDraw surface and it renders the same video perfectly
LPBITMAPINFOHEADER pBMP;
IDirect3DSurface9 *pSurface;
pAviFile->GetVideoFrameAtTime(0, time, &pBMP);
if (pBits == NULL) return false;
RECT rect = {0, 0, pBMP->biWidth, pBMP->biHeight};
pFrame->GetSurfaceLevel(0, &pSurface);
D3DXLoadSurfaceFromMemory(pSurface, NULL, NULL, pBMP + pBMP->biSize, D3DFMT_X8R8G8B8, pBMP->biWidth*(pBMP->biBitCount/8), NULL, ▭, D3DX_DEFAULT, 0);
pD3dDevice->StretchRect(pSurface, NULL, pBackBuffer, NULL, D3DTEXF_NONE);
return 1;