[vlc-commits] [Git][videolan/vlc][master] macosx/open: remove use of obsolete server-port variable
Jean-Baptiste Kempf
gitlab at videolan.org
Wed May 19 11:07:06 UTC 2021
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
a30a0fb7 by Felix Paul Kühne at 2021-05-19T10:33:49+00:00
macosx/open: remove use of obsolete server-port variable
This fixes #25730.
- - - - -
1 changed file:
- modules/gui/macosx/windows/VLCOpenWindowController.m
Changes:
=====================================
modules/gui/macosx/windows/VLCOpenWindowController.m
=====================================
@@ -1,7 +1,7 @@
/*****************************************************************************
* VLCOpenWindowController.m: Open dialogues for VLC's MacOS X port
*****************************************************************************
- * Copyright (C) 2002-2019 VLC authors and VideoLAN
+ * Copyright (C) 2002-2021 VLC authors and VideoLAN
*
* Authors: Jon Lech Johansen <jon-vl at nanocrew.net>
* Christophe Massiot <massiot at via.ecp.fr>
@@ -259,8 +259,8 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
[[_netModeMatrix cellAtRow:0 column:0] setTitle: _NS("Unicast")];
[[_netModeMatrix cellAtRow:1 column:0] setTitle: _NS("Multicast")];
- [_netUDPPortTextField setIntegerValue: config_GetInt("server-port")];
- [_netUDPPortStepper setIntegerValue: config_GetInt("server-port")];
+ [_netUDPPortTextField setIntegerValue: 0];
+ [_netUDPPortStepper setIntegerValue: 0];
[_captureModePopup removeAllItems];
[_captureModePopup addItemWithTitle: _NS("Input Devices")];
@@ -998,23 +998,22 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
else
mrlString = @"rtp://";
- if (port != config_GetInt("server-port")) {
+ if (port > 0) {
mrlString =
[mrlString stringByAppendingFormat: @"@:%i", port];
}
}
else if ([mode isEqualToString: _NS("Multicast")]) {
- NSString *oAddress = [_netUDPMAddressTextField stringValue];
- int iPort = [_netUDPMPortTextField intValue];
+ NSString *address = [_netUDPMAddressTextField stringValue];
+ int port = [_netUDPMPortTextField intValue];
if ([[_netUDPProtocolMatrix selectedCell] tag] == 0)
- mrlString = [NSString stringWithFormat: @"udp://@%@", oAddress];
+ mrlString = [NSString stringWithFormat: @"udp://@%@", address];
else
- mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
+ mrlString = [NSString stringWithFormat: @"rtp://@%@", address];
- if (iPort != config_GetInt("server-port")) {
- mrlString =
- [mrlString stringByAppendingFormat: @":%i", iPort];
+ if (port > 0) {
+ mrlString = [mrlString stringByAppendingFormat: @":%i", port];
}
}
} else
@@ -1044,23 +1043,21 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
else
mrlString = @"rtp://";
- if (port != config_GetInt("server-port")) {
- mrlString =
- [mrlString stringByAppendingFormat: @"@:%i", port];
+ if (port > 0) {
+ mrlString = [mrlString stringByAppendingFormat: @"@:%i", port];
}
}
else if ([[[_netModeMatrix selectedCell] title] isEqualToString: _NS("Multicast")]) {
- NSString *oAddress = [_netUDPMAddressTextField stringValue];
- int iPort = [_netUDPMPortTextField intValue];
+ NSString *address = [_netUDPMAddressTextField stringValue];
+ int port = [_netUDPMPortTextField intValue];
if ([[_netUDPProtocolMatrix selectedCell] tag] == 0)
- mrlString = [NSString stringWithFormat: @"udp://@%@", oAddress];
+ mrlString = [NSString stringWithFormat: @"udp://@%@", address];
else
- mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
+ mrlString = [NSString stringWithFormat: @"rtp://@%@", address];
- if (iPort != config_GetInt("server-port")) {
- mrlString =
- [mrlString stringByAppendingFormat: @":%i", iPort];
+ if (port > 0) {
+ mrlString = [mrlString stringByAppendingFormat: @":%i", port];
}
}
[self setMRL: mrlString];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a30a0fb72d90662539f306f69c8a23bba29606af
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a30a0fb72d90662539f306f69c8a23bba29606af
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list