mirror of https://code.videolan.org/videolan/vlc
sccaess_screen: little cleaning.
This commit is contained in:
parent
17d0f722d5
commit
6f24f33257
|
@ -186,7 +186,7 @@ block_t *screen_Capture( demux_t *p_demux )
|
|||
if( !( p_block = block_New( p_demux, i_size ) ) )
|
||||
{
|
||||
msg_Warn( p_demux, "cannot get block" );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CGPoint cursor_pos;
|
||||
|
|
|
@ -137,7 +137,6 @@ static int Open( vlc_object_t *p_this )
|
|||
{
|
||||
demux_t *p_demux = (demux_t*)p_this;
|
||||
demux_sys_t *p_sys;
|
||||
vlc_value_t val;
|
||||
|
||||
/* Fill p_demux field */
|
||||
p_demux->pf_demux = Demux;
|
||||
|
@ -149,10 +148,8 @@ static int Open( vlc_object_t *p_this )
|
|||
/* Update default_pts to a suitable value for screen access */
|
||||
var_Create( p_demux, "screen-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
|
||||
|
||||
var_Create( p_demux, "screen-fps", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT );
|
||||
var_Get( p_demux, "screen-fps", &val );
|
||||
p_sys->f_fps = val.f_float;
|
||||
p_sys->i_incr = 1000000 / val.f_float;
|
||||
p_sys->f_fps = var_CreateGetFloat( p_demux, "screen-fps" );
|
||||
p_sys->i_incr = 1000000 / p_sys->f_fps;;
|
||||
p_sys->i_next_date = 0;
|
||||
|
||||
#ifdef SCREEN_SUBSCREEN
|
||||
|
|
|
@ -150,7 +150,7 @@ block_t *screen_Capture( demux_t *p_demux )
|
|||
if( !image )
|
||||
{
|
||||
msg_Warn( p_demux, "cannot get image" );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
i_size = image->bytes_per_line * image->height;
|
||||
|
@ -159,7 +159,7 @@ block_t *screen_Capture( demux_t *p_demux )
|
|||
{
|
||||
msg_Warn( p_demux, "cannot get block" );
|
||||
XDestroyImage( image );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
vlc_memcpy( p_block->p_buffer, image->data, i_size );
|
||||
|
|
Loading…
Reference in New Issue