[vlc-commits] transcode: remove deinterlace boolean
Rémi Denis-Courmont
git at videolan.org
Mon Nov 14 19:26:23 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 13 18:41:14 2016 +0200| [f8e3d39cb145238aac3ee5fcd3bf90f7a07d57d5] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8e3d39cb145238aac3ee5fcd3bf90f7a07d57d5
---
modules/stream_out/transcode/transcode.c | 19 +++++++------------
modules/stream_out/transcode/transcode.h | 1 -
modules/stream_out/transcode/video.c | 2 +-
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index 25e5bd5..3856f00 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -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" );
diff --git a/modules/stream_out/transcode/transcode.h b/modules/stream_out/transcode/transcode.h
index eca3298..ff36c09 100644
--- a/modules/stream_out/transcode/transcode.h
+++ b/modules/stream_out/transcode/transcode.h
@@ -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;
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index ccf50fb..19ba497 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -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,
More information about the vlc-commits
mailing list