[vlc-devel] [PATCH v5 13/24] video_output: always use interlacing.has_deint when creating filters

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 24 09:41:54 CEST 2020


If the value changed, just set it to the newest value.
---
 src/video_output/video_output.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6ad052eb25a..954c5f93243 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -919,8 +919,7 @@ typedef struct {
     config_chain_t *cfg;
 } vout_filter_t;
 
-static void ThreadChangeFilters(vout_thread_sys_t *vout,
-                                const bool *new_deinterlace)
+static void ThreadChangeFilters(vout_thread_sys_t *vout)
 {
     vout_thread_sys_t *sys = vout;
     ThreadFilterFlush(vout, true);
@@ -932,9 +931,6 @@ static void ThreadChangeFilters(vout_thread_sys_t *vout,
     vlc_array_init(&array_static);
     vlc_array_init(&array_interactive);
 
-    if (new_deinterlace != NULL)
-        sys->private.interlacing.has_deint = *new_deinterlace;
-
     if (sys->private.interlacing.has_deint)
     {
         vout_filter_t *e = malloc(sizeof(*e));
@@ -1096,7 +1092,7 @@ static int ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reuse,
                         vlc_video_context_Release(sys->filter.src_vctx);
                     sys->filter.src_vctx = pic_vctx ? vlc_video_context_Hold(pic_vctx) : NULL;
 
-                    ThreadChangeFilters(vout, NULL);
+                    ThreadChangeFilters(vout);
                 }
             }
         }
@@ -1445,7 +1441,8 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
     if (sys->filter.changed ||
         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);
 
-- 
2.26.2



More information about the vlc-devel mailing list