[vlc-devel] [PATCH 03/23] macosx: apply filters change on all vouts

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Thu Jun 29 14:24:10 CEST 2017


---
 modules/gui/macosx/VLCCoreInteraction.m              | 5 +++--
 modules/gui/macosx/VLCVideoEffectsWindowController.m | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index abda75c6fd..9805deec49 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -781,8 +781,9 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
     /* Try to set non splitter filters on the fly */
     if (strcmp(psz_filter_type, "video-splitter")) {
-        vout_thread_t *p_vout = getVout();
-        if (p_vout) {
+        NSArray<NSValue *> *vouts = getVouts();
+        for (NSValue * val in vouts) {
+            vout_thread_t *p_vout = [val pointerValue];
             var_SetString(p_vout, psz_filter_type, psz_string);
             vlc_object_release(p_vout);
         }
diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index 27cba7e6b1..842c7c08c5 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -914,8 +914,9 @@
             [self setCropRightValue: [self cropLeftValue]];
     }
 
-    vout_thread_t *p_vout = getVout();
-    if (p_vout) {
+    NSArray<NSValue *> *vouts = getVouts();
+    for (NSValue *ptr in vouts)
+        vout_thread_t *p_vout = [ptr pointerValue];
         var_SetInteger(p_vout, "crop-top", [_cropTopTextField intValue]);
         var_SetInteger(p_vout, "crop-bottom", [_cropBottomTextField intValue]);
         var_SetInteger(p_vout, "crop-left", [_cropLeftTextField intValue]);
-- 
2.13.1



More information about the vlc-devel mailing list