Commit f8e3d39c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

transcode: remove deinterlace boolean

The deinterlace module string is meaningless if deinterlacing is
disabled, and must be set if deinterlacing is enabled. So compare it
to NULL to indicate if deinterlacing is enabled or is not.
parent f961b58a
......@@ -363,19 +363,14 @@ static int Open( vlc_object_t *p_this )
p_sys->psz_vf2 = NULL;
free( psz_string );
p_sys->b_deinterlace = var_GetBool( p_stream, SOUT_CFG_PREFIX "deinterlace" );
if( var_GetBool( p_stream, SOUT_CFG_PREFIX "deinterlace" ) )
psz_string = var_GetString( p_stream,
SOUT_CFG_PREFIX "deinterlace-module" );
else
psz_string = NULL;
psz_string = var_GetString( p_stream, SOUT_CFG_PREFIX "deinterlace-module" );
p_sys->psz_deinterlace = NULL;
p_sys->p_deinterlace_cfg = NULL;
if( psz_string && *psz_string )
{
char *psz_next;
psz_next = config_ChainCreate( &p_sys->psz_deinterlace,
&p_sys->p_deinterlace_cfg,
psz_string );
free( psz_next );
}
free( config_ChainCreate( &p_sys->psz_deinterlace,
&p_sys->p_deinterlace_cfg, psz_string ) );
free( psz_string );
p_sys->i_threads = var_GetInteger( p_stream, SOUT_CFG_PREFIX "threads" );
......
......@@ -45,7 +45,6 @@ struct sout_stream_sys_t
double f_scale;
unsigned int i_width, i_maxwidth;
unsigned int i_height, i_maxheight;
bool b_deinterlace;
char *psz_deinterlace;
config_chain_t *p_deinterlace_cfg;
int i_threads;
......
......@@ -265,7 +265,7 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
filter_chain_Reset( id->p_f_chain, p_fmt_out, p_fmt_out );
/* Deinterlace */
if( p_stream->p_sys->b_deinterlace )
if( p_stream->p_sys->psz_deinterlace != NULL )
{
filter_chain_AppendFilter( id->p_f_chain,
p_stream->p_sys->psz_deinterlace,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment