[vlc-commits] macosx: apply filters change on all vouts
Victorien Le Couviour--Tuffet
git at videolan.org
Thu Jul 13 11:23:42 CEST 2017
vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Tue Jun 20 16:51:39 2017 +0200| [d9c47b952598f1ea1007eb289c3b8e074384a741] | committer: Jean-Baptiste Kempf
macosx: apply filters change on all vouts
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9c47b952598f1ea1007eb289c3b8e074384a741
---
modules/gui/macosx/VLCCoreInteraction.m | 12 +++++++-----
modules/gui/macosx/VLCVideoEffectsWindowController.m | 18 ++++++++++--------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index abda75c6fd..e55fca8fd8 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -781,11 +781,13 @@ 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) {
- var_SetString(p_vout, psz_filter_type, psz_string);
- vlc_object_release(p_vout);
- }
+ NSArray<NSValue *> *vouts = getVouts();
+ if (vouts)
+ 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);
+ }
}
free(psz_string);
diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index 19ed86fa89..780105d42c 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -915,14 +915,16 @@
[self setCropRightValue: [self cropLeftValue]];
}
- vout_thread_t *p_vout = getVout();
- if (p_vout) {
- var_SetInteger(p_vout, "crop-top", [_cropTopTextField intValue]);
- var_SetInteger(p_vout, "crop-bottom", [_cropBottomTextField intValue]);
- var_SetInteger(p_vout, "crop-left", [_cropLeftTextField intValue]);
- var_SetInteger(p_vout, "crop-right", [_cropRightTextField intValue]);
- vlc_object_release(p_vout);
- }
+ NSArray<NSValue *> *vouts = getVouts();
+ if (vouts)
+ 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]);
+ var_SetInteger(p_vout, "crop-right", [_cropRightTextField intValue]);
+ vlc_object_release(p_vout);
+ }
}
#pragma mark -
More information about the vlc-commits
mailing list