[vlc-devel] [PATCH 09/19] video output: rename the filters input format with a less generic name

Steve Lhomme robux4 at ycbcr.xyz
Tue Nov 5 16:18:36 CET 2019


Similar to the input video context variable.
---
 src/video_output/video_output.c  | 14 +++++++-------
 src/video_output/vout_internal.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index aae1e104d2c..fecdbbe35dd 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -813,7 +813,7 @@ static void ThreadChangeFilters(vout_thread_t *vout,
         vlc_mutex_lock(&vout->p->filter.lock);
 
     es_format_t fmt_target;
-    es_format_InitFromVideo(&fmt_target, source ? source : &vout->p->filter.format);
+    es_format_InitFromVideo(&fmt_target, source ? source : &vout->p->filter.src_fmt);
 
     const es_format_t *p_fmt_current = &fmt_target;
 
@@ -865,8 +865,8 @@ static void ThreadChangeFilters(vout_thread_t *vout,
         vout->p->filter.configuration = filters ? strdup(filters) : NULL;
     }
     if (source) {
-        video_format_Clean(&vout->p->filter.format);
-        video_format_Copy(&vout->p->filter.format, source);
+        video_format_Clean(&vout->p->filter.src_fmt);
+        video_format_Copy(&vout->p->filter.src_fmt, source);
     }
 
     if (!is_locked)
@@ -926,7 +926,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse,
                         msg_Dbg(vout, "picture might be displayed late (missing %"PRId64" ms)", MS_FROM_VLC_TICK(late));
                     }
                 }
-                if (!VideoFormatIsCropArEqual(&decoded->format, &vout->p->filter.format))
+                if (!VideoFormatIsCropArEqual(&decoded->format, &vout->p->filter.src_fmt))
                     ThreadChangeFilters(vout, &decoded->format, NULL, NULL, true);
             }
         }
@@ -1517,7 +1517,7 @@ static int vout_Start(vout_thread_t *vout, vlc_video_context *vctx, const vout_c
     sys->private_pool = NULL;
 
     sys->filter.configuration = NULL;
-    video_format_Copy(&sys->filter.format, &sys->original);
+    video_format_Copy(&sys->filter.src_fmt, &sys->original);
 
     static const struct filter_video_callbacks static_cbs = {
         VoutVideoFilterStaticNewPicture,
@@ -1617,7 +1617,7 @@ error:
     }
     if (sys->filter.chain_static != NULL)
         filter_chain_Delete(sys->filter.chain_static);
-    video_format_Clean(&sys->filter.format);
+    video_format_Clean(&sys->filter.src_fmt);
     if (sys->decoder_fifo != NULL)
     {
         picture_fifo_Delete(sys->decoder_fifo);
@@ -1713,7 +1713,7 @@ static void vout_ReleaseDisplay(vout_thread_t *vout)
     ThreadDelAllFilterCallbacks(vout);
     filter_chain_Delete(sys->filter.chain_interactive);
     filter_chain_Delete(sys->filter.chain_static);
-    video_format_Clean(&sys->filter.format);
+    video_format_Clean(&sys->filter.src_fmt);
     free(sys->filter.configuration);
 
     if (sys->decoder_fifo != NULL)
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index f8b3c3980cd..42c00de9809 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -162,7 +162,7 @@ struct vout_thread_sys_t
     struct {
         vlc_mutex_t     lock;
         char            *configuration;
-        video_format_t  format;
+        video_format_t    src_fmt;
         struct filter_chain_t *chain_static;
         struct filter_chain_t *chain_interactive;
         bool            has_deint;
-- 
2.17.1



More information about the vlc-devel mailing list