[vlc-devel] [PATCH 15/23] macosx: apply subsdelay-factor change on all vouts

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


---
 modules/gui/macosx/VLCTrackSynchronizationWindowController.m | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/VLCTrackSynchronizationWindowController.m b/modules/gui/macosx/VLCTrackSynchronizationWindowController.m
index b3c137e312..abb1e130af 100644
--- a/modules/gui/macosx/VLCTrackSynchronizationWindowController.m
+++ b/modules/gui/macosx/VLCTrackSynchronizationWindowController.m
@@ -197,12 +197,13 @@
 
     if (p_input) {
         float f_factor = [_sv_durTextField floatValue];
+        NSArray<NSValue *> *vouts = getVouts();
 
-        /* Try to find an instance of subsdelay, and set its factor */
-        vlc_object_t *p_obj = (vlc_object_t *) vlc_object_find_name(getIntf()->obj.libvlc, "subsdelay");
-        if (p_obj) {
-            var_SetFloat(p_obj, SUBSDELAY_CFG_FACTOR, f_factor);
-            vlc_object_release(p_obj);
+        for (NSValue *ptr in vouts) {
+            vout_thread_t *p_vout = [ptr pointerValue];
+
+            var_SetFloat(p_vout, SUBSDELAY_CFG_FACTOR, f_factor);
+            vlc_object_release(p_vout);
         }
         [[VLCCoreInteraction sharedInstance] setVideoFilter: "subsdelay" on: f_factor > 0];
 
-- 
2.13.1



More information about the vlc-devel mailing list