Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
083c2a24
Commit
083c2a24
authored
Jul 21, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix a bunch of string memleaks in video effects panel code
parent
a3c4d7c7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
27 deletions
+70
-27
modules/gui/macosx/StringUtility.h
modules/gui/macosx/StringUtility.h
+8
-0
modules/gui/macosx/StringUtility.m
modules/gui/macosx/StringUtility.m
+28
-0
modules/gui/macosx/VideoEffects.h
modules/gui/macosx/VideoEffects.h
+1
-1
modules/gui/macosx/VideoEffects.m
modules/gui/macosx/VideoEffects.m
+33
-26
No files found.
modules/gui/macosx/StringUtility.h
View file @
083c2a24
...
@@ -32,6 +32,10 @@
...
@@ -32,6 +32,10 @@
* the translated string. the translation should be '1:translatedstring' though */
* the translated string. the translation should be '1:translatedstring' though */
#define _ANS(s) [[[VLCStringUtility sharedInstance] localizedString: _(s)] substringFromIndex:2]
#define _ANS(s) [[[VLCStringUtility sharedInstance] localizedString: _(s)] substringFromIndex:2]
#define B64DecNSStr(s) [[VLCStringUtility sharedInstance] b64Decode: s]
#define B64EncAndFree(s) [[VLCStringUtility sharedInstance] b64EncodeAndFree: s]
unsigned
int
CocoaKeyToVLC
(
unichar
i_key
);
unsigned
int
CocoaKeyToVLC
(
unichar
i_key
);
@interface
VLCStringUtility
:
NSObject
@interface
VLCStringUtility
:
NSObject
...
@@ -46,4 +50,8 @@ unsigned int CocoaKeyToVLC(unichar i_key);
...
@@ -46,4 +50,8 @@ unsigned int CocoaKeyToVLC(unichar i_key);
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
;
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
;
-
(
unsigned
int
)
VLCModifiersToCocoa
:(
NSString
*
)
theString
;
-
(
unsigned
int
)
VLCModifiersToCocoa
:(
NSString
*
)
theString
;
-
(
NSString
*
)
b64Decode
:(
NSString
*
)
string
;
-
(
NSString
*
)
b64EncodeAndFree
:(
char
*
)
psz_string
;
@end
@end
modules/gui/macosx/StringUtility.m
View file @
083c2a24
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#import <vlc_input.h>
#import <vlc_input.h>
#import <vlc_keys.h>
#import <vlc_keys.h>
#import <vlc_strings.h>
#import "StringUtility.h"
#import "StringUtility.h"
#import "intf.h"
#import "intf.h"
...
@@ -322,4 +324,30 @@ unsigned int CocoaKeyToVLC(unichar i_key)
...
@@ -322,4 +324,30 @@ unsigned int CocoaKeyToVLC(unichar i_key)
return
theString
;
return
theString
;
}
}
-
(
NSString
*
)
b64Decode
:(
NSString
*
)
string
{
char
*
psz_decoded_string
=
vlc_b64_decode
([
string
UTF8String
]);
if
(
!
psz_decoded_string
)
return
@""
;
NSString
*
returnStr
=
[
NSString
stringWithFormat
:
@"%s"
,
psz_decoded_string
];
free
(
psz_decoded_string
);
return
returnStr
;
}
-
(
NSString
*
)
b64EncodeAndFree
:(
char
*
)
psz_string
{
char
*
psz_encoded_string
=
vlc_b64_encode
(
psz_string
);
free
(
psz_string
);
if
(
!
psz_encoded_string
)
return
@""
;
NSString
*
returnStr
=
[
NSString
stringWithFormat
:
@"%s"
,
psz_encoded_string
];
free
(
psz_encoded_string
);
return
returnStr
;
}
@end
@end
modules/gui/macosx/VideoEffects.h
View file @
083c2a24
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
-
(
void
)
setVideoFilter
:
(
char
*
)
psz_name
on
:(
BOOL
)
b_on
;
-
(
void
)
setVideoFilter
:
(
char
*
)
psz_name
on
:(
BOOL
)
b_on
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
integer
:
(
int
)
i_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
integer
:
(
int
)
i_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
float
:
(
float
)
f_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
float
:
(
float
)
f_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
string
:
(
char
*
)
psz_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
string
:
(
c
onst
c
har
*
)
psz_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
boolean
:
(
BOOL
)
b_value
;
-
(
void
)
setVideoFilterProperty
:
(
char
*
)
psz_name
forFilter
:
(
char
*
)
psz_filter
boolean
:
(
BOOL
)
b_value
;
-
(
void
)
saveCurrentProfile
;
-
(
void
)
saveCurrentProfile
;
...
...
modules/gui/macosx/VideoEffects.m
View file @
083c2a24
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment