Commit 3d6a804a authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

deinterlace: fix filter selection

Apply the filter setting *after* initializing the context.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 14ba7d2d
......@@ -318,13 +318,13 @@ notsupp:
p_sys->chroma = chroma;
InitDeinterlacingContext( &p_sys->context );
config_ChainParse( p_filter, FILTER_CFG_PREFIX, ppsz_filter_options,
p_filter->p_cfg );
char *psz_mode = var_InheritString( p_filter, FILTER_CFG_PREFIX "mode" );
SetFilterMethod( p_filter, psz_mode, packed );
InitDeinterlacingContext( &p_sys->context );
IVTCClearState( p_filter );
#if defined(CAN_COMPILE_C_ALTIVEC)
......
......@@ -419,6 +419,8 @@ static int Open(vlc_object_t *obj)
sys->procEnumerator = processorEnumerator;
InitDeinterlacingContext( &sys->context );
sys->context.settings = p_mode->settings;
if (sys->context.settings.b_double_rate)
sys->context.pf_render_ordered = RenderPic;
......@@ -433,8 +435,6 @@ static int Open(vlc_object_t *obj)
goto error;
}
InitDeinterlacingContext( &sys->context );
filter->fmt_out.video = out_fmt;
filter->pf_video_filter = Deinterlace;
filter->pf_flush = Flush;
......
......@@ -357,6 +357,8 @@ static int Open(vlc_object_t *obj)
sys->d3d9_dll = d3d9_dll;
sys->decoder_caps = best_caps;
InitDeinterlacingContext( &sys->context );
sys->context.settings = p_mode->settings;
sys->context.settings.b_use_frame_history = best_caps.NumBackwardRefSamples != 0 ||
best_caps.NumForwardRefSamples != 0;
......@@ -374,8 +376,6 @@ static int Open(vlc_object_t *obj)
goto error;
}
InitDeinterlacingContext( &sys->context );
filter->fmt_out.video = out_fmt;
filter->pf_video_filter = Deinterlace;
filter->pf_flush = Flush;
......
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