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
3dbc91be
Commit
3dbc91be
authored
Jul 21, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix moar string memleaks in audio effects code
parent
083c2a24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/AudioEffects.m
+8
-7
No files found.
modules/gui/macosx/AudioEffects.m
View file @
3dbc91be
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#import "SharedDialogs.h"
#import "SharedDialogs.h"
#import <vlc_common.h>
#import <vlc_common.h>
#import <vlc_strings.h>
#import <math.h>
#import <math.h>
...
@@ -238,9 +237,9 @@ static VLCAudioEffects *_o_sharedInstance = nil;
...
@@ -238,9 +237,9 @@ static VLCAudioEffects *_o_sharedInstance = nil;
if
(
p_object
==
NULL
)
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
NSString
*
o_str
=
[
NSString
stringWithFormat
:
@"%
s;%s
;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%lli"
,
NSString
*
o_str
=
[
NSString
stringWithFormat
:
@"%
@;%@
;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%lli"
,
vlc_b64_encod
e
(
var_GetNonEmptyString
(
p_object
,
"equalizer-preset"
)),
B64EncAndFre
e
(
var_GetNonEmptyString
(
p_object
,
"equalizer-preset"
)),
vlc_b64_encod
e
(
config_GetPsz
(
p_intf
,
"audio-filter"
)),
B64EncAndFre
e
(
config_GetPsz
(
p_intf
,
"audio-filter"
)),
config_GetFloat
(
p_intf
,
"compressor-rms-peak"
),
config_GetFloat
(
p_intf
,
"compressor-rms-peak"
),
config_GetFloat
(
p_intf
,
"compressor-attack"
),
config_GetFloat
(
p_intf
,
"compressor-attack"
),
config_GetFloat
(
p_intf
,
"compressor-release"
),
config_GetFloat
(
p_intf
,
"compressor-release"
),
...
@@ -308,11 +307,11 @@ static VLCAudioEffects *_o_sharedInstance = nil;
...
@@ -308,11 +307,11 @@ static VLCAudioEffects *_o_sharedInstance = nil;
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
var_SetString
(
p_object
,
"equalizer-preset"
,
vlc_b64_decode
([[
items
objectAtIndex
:
0
]
UTF8String
])
);
var_SetString
(
p_object
,
"equalizer-preset"
,
[
B64DecNSStr
([
items
objectAtIndex
:
0
])
UTF8String
]
);
vlc_object_release
(
p_object
);
vlc_object_release
(
p_object
);
/* filter handling */
/* filter handling */
NSString
*
tempString
=
[
NSString
stringWithFormat
:
@"%s"
,
vlc_b64_decode
([[
items
objectAtIndex
:
1
]
UTF8String
])]
;
NSString
*
tempString
=
B64DecNSStr
([
items
objectAtIndex
:
1
])
;
NSArray
*
tempArray
;
NSArray
*
tempArray
;
NSUInteger
count
;
NSUInteger
count
;
/* enable the new filters, if we have an aout */
/* enable the new filters, if we have an aout */
...
@@ -473,7 +472,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
...
@@ -473,7 +472,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
NSString
*
currentPreset
=
nil
;
NSString
*
currentPreset
=
nil
;
if
(
p_aout
)
{
if
(
p_aout
)
{
currentPreset
=
[
NSString
stringWithFormat
:
@"%s"
,
var_GetNonEmptyString
(
p_aout
,
"equalizer-preset"
)];
char
*
psz_preset_string
=
var_GetNonEmptyString
(
p_aout
,
"equalizer-preset"
);
currentPreset
=
[
NSString
stringWithFormat
:
@"%s"
,
psz_preset_string
];
free
(
psz_preset_string
);
vlc_object_release
(
p_aout
);
vlc_object_release
(
p_aout
);
}
}
...
...
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