Commit b125e51b authored by Steve Lhomme's avatar Steve Lhomme
Browse files

video_output: set interlacing.has_deint when deinterlacing changes

Before calling ThreadChangeFilters().

No need to pass a value for deinterlacing anymore.
parent 3302ec8f
...@@ -957,8 +957,7 @@ typedef struct { ...@@ -957,8 +957,7 @@ typedef struct {
config_chain_t *cfg; config_chain_t *cfg;
} vout_filter_t; } vout_filter_t;
static void ThreadChangeFilters(vout_thread_sys_t *vout, static void ThreadChangeFilters(vout_thread_sys_t *vout)
const bool *new_deinterlace)
{ {
vout_thread_sys_t *sys = vout; vout_thread_sys_t *sys = vout;
ThreadFilterFlush(vout, true); ThreadFilterFlush(vout, true);
...@@ -970,9 +969,6 @@ static void ThreadChangeFilters(vout_thread_sys_t *vout, ...@@ -970,9 +969,6 @@ static void ThreadChangeFilters(vout_thread_sys_t *vout,
vlc_array_init(&array_static); vlc_array_init(&array_static);
vlc_array_init(&array_interactive); vlc_array_init(&array_interactive);
if (new_deinterlace != NULL)
sys->private.interlacing.has_deint = *new_deinterlace;
if (sys->private.interlacing.has_deint) if (sys->private.interlacing.has_deint)
{ {
vout_filter_t *e = malloc(sizeof(*e)); vout_filter_t *e = malloc(sizeof(*e));
...@@ -1134,7 +1130,7 @@ static int ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reuse, ...@@ -1134,7 +1130,7 @@ static int ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reuse,
vlc_video_context_Release(sys->filter.src_vctx); vlc_video_context_Release(sys->filter.src_vctx);
sys->filter.src_vctx = pic_vctx ? vlc_video_context_Hold(pic_vctx) : NULL; sys->filter.src_vctx = pic_vctx ? vlc_video_context_Hold(pic_vctx) : NULL;
ThreadChangeFilters(vout, NULL); ThreadChangeFilters(vout);
} }
} }
} }
...@@ -1484,7 +1480,8 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline) ...@@ -1484,7 +1480,8 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
if (sys->filter.changed || if (sys->filter.changed ||
sys->private.interlacing.has_deint != sys->filter.new_interlaced) sys->private.interlacing.has_deint != sys->filter.new_interlaced)
{ {
ThreadChangeFilters(vout, &sys->filter.new_interlaced); sys->private.interlacing.has_deint = sys->filter.new_interlaced;
ThreadChangeFilters(vout);
} }
vlc_mutex_unlock(&sys->filter.lock); vlc_mutex_unlock(&sys->filter.lock);
......
Supports Markdown
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