p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
memset( p_sys, 0, sizeof( demux_sys_t ) );
-
if( InitCapture( p_demux ) != VLC_SUCCESS )
{
free( p_sys );
static int InitCapture( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
- int i_chroma;
+ int i_chroma, i_bits_per_pixel;
BITMAPINFO bmi;
return VLC_EGENERIC;
}
- p_sys->fmt.video.i_bits_per_pixel =
- GetDeviceCaps( p_sys->hdc_src, BITSPIXEL );
- switch( p_sys->fmt.video.i_bits_per_pixel )
+ i_bits_per_pixel = GetDeviceCaps( p_sys->hdc_src, BITSPIXEL );
+ switch( i_bits_per_pixel )
{
case 8: /* FIXME: set the palette */
i_chroma = VLC_FOURCC('R','G','B','2'); break;
return VLC_EGENERIC;
}
+#if 1 /* For now we force RV24 because of chroma inversion in the other cases*/
+ i_chroma = VLC_FOURCC('R','V','2','4');
+ i_bits_per_pixel = 24;
+#endif
+
es_format_Init( &p_sys->fmt, VIDEO_ES, i_chroma );
p_sys->fmt.video.i_width = GetDeviceCaps( p_sys->hdc_src, HORZRES );
p_sys->fmt.video.i_height = GetDeviceCaps( p_sys->hdc_src, VERTRES );
- p_sys->fmt.video.i_bits_per_pixel =
- GetDeviceCaps( p_sys->hdc_src, BITSPIXEL );
+ p_sys->fmt.video.i_bits_per_pixel = i_bits_per_pixel;
/* Create the bitmap info header */
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);