RGBA: VFW and SDL

Hi All,

I have a basic doubt on the RGBA Display, between the VFW and SDL.
I am trying to capture video using the MS SDK Video For Windows and
Play using the SDL. I am not sure why I am getting a Monochrome Output
On the SDL’s Display window,

This is my Bitmap Header in the VFW capturing side,

bitMapInfo.bmiHeader.biBitCount = 32;
bitMapInfo.bmiHeader.biCompression = BI_RGB;
bitMapInfo.bmiHeader.biSizeImage = (240 * 240 * 4);
bitMapInfo.bmiHeader.biWidth = 240;
bitMapInfo.bmiHeader.biHeight = 240;

On the SDL side, I initialize the display window with bits-per-pixel as
32 and
This is my code on the SDL Playing side, Where is “pixel” is my video
frame buffer

pxl8 = ((Uint8 *)surface->pixels);
for(height=0;height < scrHeight; height++)
for(width=0;(width < scrWidth); width++, pxl8+=bpp,
pixel++,sizeBytes-=bpp){
pixel8 = (Uint8 *)pixel;
color = SDL_MapRGBA( surface->format, *(pixel8+3),
*(pixel8+2), *(pixel8+1), *(pixel8));
*(Uint32 *)pxl8 = color;
}

Please Let me know if I am missing something, here.

Thanx,
Palani.