[vlc-devel] [PATCH 11/19] video output: rename fmt_target to fmt_input

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


It's always the filter input format, it doesn't change afterwards, unlike the
p_fmt_current.
---
 src/video_output/video_output.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a67e2fec1ca..7674579bc30 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -812,10 +812,10 @@ static void ThreadChangeFilters(vout_thread_t *vout,
     if (!is_locked)
         vlc_mutex_lock(&vout->p->filter.lock);
 
-    es_format_t fmt_target;
-    es_format_InitFromVideo(&fmt_target, source ? source : &vout->p->filter.src_fmt);
+    es_format_t fmt_input;
+    es_format_InitFromVideo(&fmt_input, source ? source : &vout->p->filter.src_fmt);
 
-    const es_format_t *p_fmt_current = &fmt_target;
+    const es_format_t *p_fmt_current = &fmt_input;
 
     for (int a = 0; a < 2; a++) {
         vlc_array_t    *array = a == 0 ? &array_static :
@@ -847,18 +847,18 @@ static void ThreadChangeFilters(vout_thread_t *vout,
         vlc_array_clear(array);
     }
 
-    if (!es_format_IsSimilar(p_fmt_current, &fmt_target)) {
+    if (!es_format_IsSimilar(p_fmt_current, &fmt_input)) {
         msg_Dbg(vout, "Adding a filter to compensate for format changes");
         if (filter_chain_AppendConverter(vout->p->filter.chain_interactive,
-                                         p_fmt_current, &fmt_target) != 0) {
+                                         p_fmt_current, &fmt_input) != 0) {
             msg_Err(vout, "Failed to compensate for the format changes, removing all filters");
             ThreadDelAllFilterCallbacks(vout);
-            filter_chain_Reset(vout->p->filter.chain_static,      &fmt_target, &fmt_target);
-            filter_chain_Reset(vout->p->filter.chain_interactive, &fmt_target, &fmt_target);
+            filter_chain_Reset(vout->p->filter.chain_static,      &fmt_input, &fmt_input);
+            filter_chain_Reset(vout->p->filter.chain_interactive, &fmt_input, &fmt_input);
         }
     }
 
-    es_format_Clean(&fmt_target);
+    es_format_Clean(&fmt_input);
 
     if (vout->p->filter.configuration != filters) {
         free(vout->p->filter.configuration);
-- 
2.17.1



More information about the vlc-devel mailing list